From f5cc8453860568351cd9b3b7a05d06e1462460e8 Mon Sep 17 00:00:00 2001 From: Joe Groocock Date: Wed, 10 May 2023 19:17:28 +0000 Subject: veth: T3829: Allow moving veth into netns This makes netns infinitely more useful as they can be chained together in many ways to build complex network structures all on the host. Signed-off-by: Joe Groocock --- interface-definitions/interfaces-virtual-ethernet.xml.in | 1 + python/vyos/ifconfig/interface.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/interface-definitions/interfaces-virtual-ethernet.xml.in b/interface-definitions/interfaces-virtual-ethernet.xml.in index 864f658da..a5702bfc0 100644 --- a/interface-definitions/interfaces-virtual-ethernet.xml.in +++ b/interface-definitions/interfaces-virtual-ethernet.xml.in @@ -22,6 +22,7 @@ #include #include #include + #include Virtual ethernet peer interface name diff --git a/python/vyos/ifconfig/interface.py b/python/vyos/ifconfig/interface.py index f62b9f7d2..2f1d5eb96 100644 --- a/python/vyos/ifconfig/interface.py +++ b/python/vyos/ifconfig/interface.py @@ -532,7 +532,7 @@ class Interface(Control): return None # As a PoC we only allow 'dummy' interfaces - if 'dum' not in self.ifname: + if not ('dum' in self.ifname or 'veth' in self.ifname): return None # Check if interface realy exists in namespace -- cgit v1.2.3