[pve-devel] [PATCH ifupdown2 4/4] bridge up : skip tap|veth|fwpr

Alexandre Derumier aderumier at odiso.com
Wed Apr 17 01:25:53 CEST 2019


to avoid error like

info: vmbr5001: applying bridge port configuration: ['tap111i0']
info: vmbr5001: applying bridge configuration specific to ports
error: 'NoneType' object has no attribute '__getitem__'
---
 .../pve/0006-bridge-up-skip-tap-veth-fwpr.patch    | 30 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 31 insertions(+)
 create mode 100644 debian/patches/pve/0006-bridge-up-skip-tap-veth-fwpr.patch

diff --git a/debian/patches/pve/0006-bridge-up-skip-tap-veth-fwpr.patch b/debian/patches/pve/0006-bridge-up-skip-tap-veth-fwpr.patch
new file mode 100644
index 0000000..70a9867
--- /dev/null
+++ b/debian/patches/pve/0006-bridge-up-skip-tap-veth-fwpr.patch
@@ -0,0 +1,30 @@
+From 0afe358bb8fb326161fd7cf16f9686eac0c84ca1 Mon Sep 17 00:00:00 2001
+From: Alexandre Derumier <aderumier at odiso.com>
+Date: Wed, 17 Apr 2019 01:02:51 +0200
+Subject: [PATCH] bridge up : skip tap|veth|fwpr
+
+to avoid this kind of error:
+
+info: vmbr5001: applying bridge port configuration: ['tap111i0']
+info: vmbr5001: applying bridge configuration specific to ports
+error: 'NoneType' object has no attribute '__getitem__'
+---
+ ifupdown2/addons/bridge.py | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/ifupdown2/addons/bridge.py b/ifupdown2/addons/bridge.py
+index e70fc07..fbbe8e4 100644
+--- a/ifupdown2/addons/bridge.py
++++ b/ifupdown2/addons/bridge.py
+@@ -2050,6 +2050,8 @@ class bridge(moduleBase):
+         finally:
+             if ifaceobj.link_type != ifaceLinkType.LINK_NA:
+                 for p in running_ports:
++                    if re.match('^(tap|veth|fwpr)',p):
++                        continue
+                     if (ifaceobj_getfunc(p)[0].link_privflags &
+                             ifaceLinkPrivFlags.KEEP_LINK_DOWN):
+                         netlink.link_set_updown(p, "down")
+-- 
+2.11.0
+
diff --git a/debian/patches/series b/debian/patches/series
index 5fc2cfc..26b9cac 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ pve/0002-don-t-remove-tap-veth-fwpr-interfaces-from-bridge-on.patch
 pve/0003-add-dummy-mtu-bridgevlanport-modules.patch
 pve/0004-debian-fixup-networking.service.patch
 pve/0005-allow-vlan-subinterface-in-a-vlan-aware-bridge.patch
+pve/0006-bridge-up-skip-tap-veth-fwpr.patch
-- 
2.11.0




More information about the pve-devel mailing list