summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-10-07 19:50:42 +0200
committerGitHub <noreply@github.com>2023-10-07 19:50:42 +0200
commit7720ee247c03eeeab895da27804996571ffb476b (patch)
tree24212ec13751537430b99d63d283620cdc0acc73 /src/conf_mode
parent669acb05c91aa90f28b9aee823b27c7a29afdec0 (diff)
parent713647429b981f35822e8b4c9fafe990d120643c (diff)
downloadvyos-1x-7720ee247c03eeeab895da27804996571ffb476b.tar.gz
vyos-1x-7720ee247c03eeeab895da27804996571ffb476b.zip
Merge pull request #2346 from vyos/mergify/bp/sagitta/pr-2335
pppoe: T5630: allow to specify MRU in addition to already configurable MTU (backport #2335)
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/interfaces-pppoe.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/conf_mode/interfaces-pppoe.py b/src/conf_mode/interfaces-pppoe.py
index fca91253c..0a03a172c 100755
--- a/src/conf_mode/interfaces-pppoe.py
+++ b/src/conf_mode/interfaces-pppoe.py
@@ -77,6 +77,11 @@ def verify(pppoe):
if {'connect_on_demand', 'vrf'} <= set(pppoe):
raise ConfigError('On-demand dialing and VRF can not be used at the same time')
+ # both MTU and MRU have default values, thus we do not need to check
+ # if the key exists
+ if int(pppoe['mru']) > int(pppoe['mtu']):
+ raise ConfigError('PPPoE MRU needs to be lower then MTU!')
+
return None
def generate(pppoe):