summaryrefslogtreecommitdiff
path: root/src/conf_mode/interfaces-pseudo-ethernet.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-03-05 17:20:55 +0100
committerChristian Poessinger <christian@poessinger.com>2020-03-05 17:20:55 +0100
commit4affc8b2fde2f0883632f163db5961ae34faccc4 (patch)
tree27a5261da4d353bb8b5b092e51e85e72f9ca1ddc /src/conf_mode/interfaces-pseudo-ethernet.py
parentd860d2f136e92c2bb959ad3c6dd9db70da0480b6 (diff)
downloadvyos-1x-4affc8b2fde2f0883632f163db5961ae34faccc4.tar.gz
vyos-1x-4affc8b2fde2f0883632f163db5961ae34faccc4.zip
macvlan: T1635: ensure 'link' interface really exists
Diffstat (limited to 'src/conf_mode/interfaces-pseudo-ethernet.py')
-rwxr-xr-xsrc/conf_mode/interfaces-pseudo-ethernet.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/conf_mode/interfaces-pseudo-ethernet.py b/src/conf_mode/interfaces-pseudo-ethernet.py
index 3d36da226..09d580b28 100755
--- a/src/conf_mode/interfaces-pseudo-ethernet.py
+++ b/src/conf_mode/interfaces-pseudo-ethernet.py
@@ -196,6 +196,9 @@ def verify(peth):
if not peth['link']:
raise ConfigError('Link device must be set for virtual ethernet {}'.format(peth['intf']))
+ if not peth['link'] in interfaces():
+ raise ConfigError('Pseudo-ethernet source interface does not exist')
+
return None
def generate(peth):