public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH ifupdown2] fix #8374: don't treat bonds with arp monitoring as vlan-aware bridges
@ 2026-12-02 13:25 Gabriel Goller
  0 siblings, 0 replies; only message in thread
From: Gabriel Goller @ 2026-12-02 13:25 UTC (permalink / raw)
  To: pve-devel

bridge_is_vlan_aware() reads attribute 7 from IFLA_INFO_DATA without
looking at the link kind. For a bond, attribute 7 is
IFLA_BOND_ARP_INTERVAL, so a bond with ARP monitoring enabled is taken
for a vlan-aware bridge. The vlan addon then tries to add the vid of
each vlan on top of the bond to the bond itself, which the kernel
rejects:

  error: netlink: bond0: cannot add bridge vlan 168: operation failed with 'Operation not supported' (95)

The network still comes up, but ifreload exits with 1, which also makes
pve-sdn-commit fail at boot. Upstream has the same bug.

Upstream PR:
https://github.com/CumulusNetworks/ifupdown2/pull/360

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
---
Based on top of the earlier ifupdown2 patch for convenience, no real
dependency.
---
 ...e-check-link-kind-in-bridge_is_vlan_aware.patch | 39 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 40 insertions(+)

diff --git a/debian/patches/pve/0023-nlcache-check-link-kind-in-bridge_is_vlan_aware.patch b/debian/patches/pve/0023-nlcache-check-link-kind-in-bridge_is_vlan_aware.patch
new file mode 100644
index 000000000000..26cf370225a0
--- /dev/null
+++ b/debian/patches/pve/0023-nlcache-check-link-kind-in-bridge_is_vlan_aware.patch
@@ -0,0 +1,39 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Gabriel Goller <g.goller@proxmox.com>
+Date: Tue, 1 Dec 2026 10:00:00 +0100
+Subject: [PATCH] nlcache: check link kind in bridge_is_vlan_aware()
+
+bridge_is_vlan_aware() reads attribute 7 from IFLA_INFO_DATA without
+looking at the link kind. For a bond, attribute 7 is
+IFLA_BOND_ARP_INTERVAL, so a bond with ARP monitoring enabled is taken
+for a vlan-aware bridge. The vlan addon then tries to add the vid of
+each vlan on top of the bond to the bond itself, which the kernel
+rejects:
+
+  error: netlink: bond0: cannot add bridge vlan 168: operation failed with 'Operation not supported' (95)
+
+The network still comes up, but ifup and ifreload exit with 1.
+
+Only read IFLA_BR_VLAN_FILTERING if the link is a bridge.
+
+Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
+---
+ ifupdown2/lib/nlcache.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/ifupdown2/lib/nlcache.py b/ifupdown2/lib/nlcache.py
+index bbd2a8bc8daa..e907829cea55 100644
+--- a/ifupdown2/lib/nlcache.py
++++ b/ifupdown2/lib/nlcache.py
+@@ -1129,7 +1129,10 @@ class _NetlinkCache:
+         """
+         try:
+             with self._cache_lock:
+-                return self._link_cache[ifname].attributes[Link.IFLA_LINKINFO].value[Link.IFLA_INFO_DATA][Link.IFLA_BR_VLAN_FILTERING]
++                linkinfo = self._link_cache[ifname].attributes[Link.IFLA_LINKINFO].value
++                if linkinfo.get(Link.IFLA_INFO_KIND) != "bridge":
++                    return False
++                return linkinfo[Link.IFLA_INFO_DATA][Link.IFLA_BR_VLAN_FILTERING]
+         except (KeyError, AttributeError):
+             return False
+         except TypeError as e:
diff --git a/debian/patches/series b/debian/patches/series
index 440d5f1b143c..4a98267ce5a2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -27,3 +27,4 @@ upstream/0006-bond-do-not-fail-the-bond-when-bond-primary-does-not.patch
 pve/0020-vxlan-apply-the-vxlan-ageing-policy-default.patch
 pve/0021-vxlan-exclude-the-IPv6-group-and-normalize-remotes-i.patch
 pve/0022-address-apply-accept-ra-and-autoconf-in-perfmode.patch
+pve/0023-nlcache-check-link-kind-in-bridge_is_vlan_aware.patch

---
base-commit: d27f731280ee8ab994112d7b951b49f901016a3b
change-id: 20261202-fix_8374_don-30bfcf56cb13
prerequisite-change-id: 20261130-d_patches_apply-7d981a4d8d45:v1
prerequisite-patch-id: e22717b938a9662093a4cd225c659fd134e2c40b

Best regards,
--  
Gabriel Goller <g.goller@proxmox.com>





^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-12-02 13:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02 13:25 [PATCH ifupdown2] fix #8374: don't treat bonds with arp monitoring as vlan-aware bridges Gabriel Goller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal