diff options
author | Christian Poessinger <christian@poessinger.com> | 2020-03-05 17:20:55 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2020-03-05 17:20:55 +0100 |
commit | 4affc8b2fde2f0883632f163db5961ae34faccc4 (patch) | |
tree | 27a5261da4d353bb8b5b092e51e85e72f9ca1ddc /src | |
parent | d860d2f136e92c2bb959ad3c6dd9db70da0480b6 (diff) | |
download | vyos-1x-4affc8b2fde2f0883632f163db5961ae34faccc4.tar.gz vyos-1x-4affc8b2fde2f0883632f163db5961ae34faccc4.zip |
macvlan: T1635: ensure 'link' interface really exists
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/interfaces-pseudo-ethernet.py | 3 |
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): |