From 4affc8b2fde2f0883632f163db5961ae34faccc4 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 5 Mar 2020 17:20:55 +0100 Subject: macvlan: T1635: ensure 'link' interface really exists --- src/conf_mode/interfaces-pseudo-ethernet.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/conf_mode') 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): -- cgit v1.2.3