From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 1C8921FF0B7 for ; Mon, 30 Nov 2026 11:55:26 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 70BF3216FB; Mon, 30 Nov 2026 11:55:24 +0100 (CET) From: Gabriel Goller Date: Mon, 30 Nov 2026 11:55:11 +0100 Subject: [PATCH ifupdown2] d/patches: apply accept-ra and autoconf at boot MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20261130-d_patches_apply-v1-1-0c4e9d0c906b@proxmox.com> X-B4-Tracking: v=1; b=H4sIAA5WDWsC/yWMWwrCMBAAr1L220ATq1avUqTE7NauSLpk+1BK7 27Uz2GYWUEpMSlcihUSzaw8xAx2V0DofbyTYcwMrnRHa/elwVb8GHrS1os83+aE59r6CmusDpA rSdTx63dsgLtJcFiig+tf6XR7UBi/R9i2D9kIpwB+AAAA X-Change-ID: 20261130-d_patches_apply-7d981a4d8d45 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: 1796036119429 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.207 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: SBM6TSWEOLAMYUVDAV4WB6NPXNPCPY6P X-Message-ID-Hash: SBM6TSWEOLAMYUVDAV4WB6NPXNPCPY6P 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: The accept-ra and autoconf options from the slaac patch, which is also in upstream pr #325, were only applied at the end of _sysctl_config(). That function returns early in perfmode, which is used for the first reload on boot. So interfaces kept the kernel defaults accept_ra=1 and autoconf=1 until the first real ifreload (user ifreload or sdn apply). Call _sysctl_slaac() from _pre_up() directly instead. Signed-off-by: Gabriel Goller --- ...-apply-accept-ra-and-autoconf-in-perfmode.patch | 38 ++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 39 insertions(+) diff --git a/debian/patches/pve/0022-address-apply-accept-ra-and-autoconf-in-perfmode.patch b/debian/patches/pve/0022-address-apply-accept-ra-and-autoconf-in-perfmode.patch new file mode 100644 index 000000000000..2bfa34b71669 --- /dev/null +++ b/debian/patches/pve/0022-address-apply-accept-ra-and-autoconf-in-perfmode.patch @@ -0,0 +1,38 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Gabriel Goller +Date: Mon, 30 Nov 2026 11:34:12 +0100 +Subject: [PATCH] address: apply accept-ra and autoconf in perfmode + +At boot, start-networking runs ifup with --perfmode. _sysctl_config() +returns early in perfmode, so _sysctl_slaac() was never reached and +interfaces kept the kernel defaults (accept_ra=1, autoconf=1) until the +next ifreload. A bridge could therefore pick up SLAAC addresses and +routes even though the configuration disabled it. + +Call _sysctl_slaac() from _pre_up() directly, so it runs regardless of +perfmode. +--- + ifupdown2/addons/address.py | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/ifupdown2/addons/address.py b/ifupdown2/addons/address.py +index 46226a96fa79..63297b410bfe 100644 +--- a/ifupdown2/addons/address.py ++++ b/ifupdown2/addons/address.py +@@ -1096,8 +1096,6 @@ class address(AddonWithIpBlackList, moduleBase): + ifaceobj.status = ifaceStatus.ERROR + self.logger.error('%s: %s' %(ifacename, str(e))) + +- self._sysctl_slaac(ifaceobj) +- + def process_mtu(self, ifaceobj, ifaceobj_getfunc): + + if ifaceobj.link_privflags & ifaceLinkPrivFlags.OPENVSWITCH: +@@ -1199,6 +1197,7 @@ class address(AddonWithIpBlackList, moduleBase): + self.netlink.link_set_alias(ifaceobj.name, ifaceobj.get_attr_value_first("alias")) + + self._sysctl_config(ifaceobj) ++ self._sysctl_slaac(ifaceobj) + + addr_method = ifaceobj.addr_method + force_reapply = False diff --git a/debian/patches/series b/debian/patches/series index ebc2d0a2f99a..440d5f1b143c 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -26,3 +26,4 @@ pve/0019-vxlan-match-IPv6-peers-when-reading-the-fdb.patch 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 --- base-commit: d27f731280ee8ab994112d7b951b49f901016a3b change-id: 20261130-d_patches_apply-7d981a4d8d45 Best regards, -- Gabriel Goller