From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id F3BD81FF0BC for ; Wed, 02 Dec 2026 14:25:31 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 2FEFE21680; Wed, 02 Dec 2026 14:25:29 +0100 (CET) From: Gabriel Goller Date: Wed, 02 Dec 2026 14:25:17 +0100 Subject: [PATCH ifupdown2] fix #8374: don't treat bonds with arp monitoring as vlan-aware bridges MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20261202-fix_8374_don-v1-1-f24aed5696d4@proxmox.com> X-B4-Tracking: v=1; b=H4sIADwcEGsC/z2N2Q6CMBBFf4XMs026sMmvGEK6TKVGoVJADeHfL Uh8meTmzj1ngYCDwwBVssCAswuu72JgpwR0K7srEmdiBk55zuIh1r2bUhRpY/qOCKqstlmuFRM QJ37A2O+4Czg7edO/Og71rwqTuqEeN9zxPOBzisrxWPyNVbL7mKDENF6OusXQSO/vH1KYc8lka kqTZtXMNpCSAYnuHw83VonhhS0E4yVFhHpdv9o5I2ziAAAA X-Change-ID: 20261202-fix_8374_don-30bfcf56cb13 To: pve-devel@lists.proxmox.com X-Mailer: b4 0.17-dev X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1796217923556 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.206 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: N2C5YL2J5W45QMRGUY7UGGOUGZB2OPHB X-Message-ID-Hash: N2C5YL2J5W45QMRGUY7UGGOUGZB2OPHB X-MailFrom: g.goller@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 --- 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 +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 +--- + 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