summaryrefslogtreecommitdiff
path: root/src/conf_mode/interfaces-pppoe.py
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2023-10-07 18:13:41 +0100
committerGitHub <noreply@github.com>2023-10-07 18:13:41 +0100
commit0d975350d0a953ef7dc311c165335f7f2977e107 (patch)
tree980b5cdd88e185dbd4303495caf6fdda3fa82e6a /src/conf_mode/interfaces-pppoe.py
parentf1eac571f22af7779ef7264425e0cc51d1aaae11 (diff)
parente357258e645cf85de0035d4ecfbf99db4dd90f7e (diff)
downloadvyos-1x-0d975350d0a953ef7dc311c165335f7f2977e107.tar.gz
vyos-1x-0d975350d0a953ef7dc311c165335f7f2977e107.zip
Merge pull request #2335 from c-po/t5630-pppoe-mru
pppoe: T5630: allow to specify MRU in addition to already configurable MTU
Diffstat (limited to 'src/conf_mode/interfaces-pppoe.py')
-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):