]> git.proxmox.com Git - ifupdown2.git/commitdiff
upstream fix for error: 'NoneType' object has no attribute '__getitem__'
authorAlexandre Derumier <aderumier@odiso.com>
Mon, 6 May 2019 04:24:59 +0000 (06:24 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 8 May 2019 12:14:04 +0000 (12:14 +0000)
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
debian/patches/extra/0001-addons-bridge-fix-NoneType-object-has-no-attribute-_.patch [new file with mode: 0644]
debian/patches/pve/0006-bridge-up-skip-tap-veth-fwpr.patch [deleted file]
debian/patches/series

diff --git a/debian/patches/extra/0001-addons-bridge-fix-NoneType-object-has-no-attribute-_.patch b/debian/patches/extra/0001-addons-bridge-fix-NoneType-object-has-no-attribute-_.patch
new file mode 100644 (file)
index 0000000..da8ce68
--- /dev/null
@@ -0,0 +1,32 @@
+From 1d35560dc603ac43a87a5584c6776d9872ede4e5 Mon Sep 17 00:00:00 2001
+From: Julien Fortin <julien@cumulusnetworks.com>
+Date: Fri, 19 Apr 2019 17:14:21 +0800
+Subject: addons: bridge: fix 'NoneType' object has
+ no attribute '__getitem__' error
+
+Fixes #90
+
+Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
+Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
+---
+ ifupdown2/addons/bridge.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/ifupdown2/addons/bridge.py b/ifupdown2/addons/bridge.py
+index 9c1de18..973ec7e 100644
+--- a/ifupdown2/addons/bridge.py
++++ b/ifupdown2/addons/bridge.py
+@@ -2055,8 +2055,8 @@ class bridge(moduleBase):
+         finally:
+             if ifaceobj.link_type != ifaceLinkType.LINK_NA:
+                 for p in running_ports:
+-                    if (ifaceobj_getfunc(p)[0].link_privflags &
+-                            ifaceLinkPrivFlags.KEEP_LINK_DOWN):
++                    ifaceobj_list = ifaceobj_getfunc(p)
++                    if (ifaceobj_list and ifaceobj_list[0].link_privflags & ifaceLinkPrivFlags.KEEP_LINK_DOWN):
+                         netlink.link_set_updown(p, "down")
+                         continue
+                     try:
+-- 
+2.11.0
+
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
deleted file mode 100644 (file)
index 70a9867..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-From 0afe358bb8fb326161fd7cf16f9686eac0c84ca1 Mon Sep 17 00:00:00 2001
-From: Alexandre Derumier <aderumier@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
-
index 26b9cac2578fd575eae076cc266a30e85afb00c4..5975ab1cc5f75ee121dc53120dbb516718f6871a 100644 (file)
@@ -3,4 +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
+extra/0001-addons-bridge-fix-NoneType-object-has-no-attribute-_.patch