summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-05-24 10:26:11 +0200
committerChristian Poessinger <christian@poessinger.com>2021-05-24 10:46:22 +0200
commit1064c5f901b8fb656793dd374a63635ac5375719 (patch)
tree08610dcab58020562fc3acbab074aa7acd4ec656 /src
parentf0020ef10d601c5e8dbcc4ed8fb1dab402170c9e (diff)
downloadvyos-1x-1064c5f901b8fb656793dd374a63635ac5375719.tar.gz
vyos-1x-1064c5f901b8fb656793dd374a63635ac5375719.zip
pseudo-ethernet: T3575: verify parent interface MTU
(cherry picked from commit 38b3dff1ebdf8c26a28d0befa6dcf0b4f51f21be)
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/interfaces-pseudo-ethernet.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/conf_mode/interfaces-pseudo-ethernet.py b/src/conf_mode/interfaces-pseudo-ethernet.py
index ddbef56ac..4bd75f770 100755
--- a/src/conf_mode/interfaces-pseudo-ethernet.py
+++ b/src/conf_mode/interfaces-pseudo-ethernet.py
@@ -24,6 +24,7 @@ from vyos.configverify import verify_address
from vyos.configverify import verify_bridge_delete
from vyos.configverify import verify_source_interface
from vyos.configverify import verify_vlan_config
+from vyos.configverify import verify_mtu_parent
from vyos.ifconfig import MACVLANIf
from vyos import ConfigError
@@ -45,6 +46,9 @@ def get_config(config=None):
mode = leaf_node_changed(conf, ['mode'])
if mode: peth.update({'mode_old' : mode})
+ if 'source_interface' in peth:
+ peth['parent'] = get_interface_dict(conf, ['interfaces', 'ethernet'],
+ peth['source_interface'])
return peth
def verify(peth):
@@ -55,9 +59,10 @@ def verify(peth):
verify_source_interface(peth)
verify_vrf(peth)
verify_address(peth)
-
+ verify_mtu_parent(peth, peth['parent'])
# use common function to verify VLAN configuration
verify_vlan_config(peth)
+
return None
def generate(peth):