public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH ifupdown2] d/patches: apply accept-ra and autoconf at boot
@ 2026-11-30 10:55 Gabriel Goller
  0 siblings, 0 replies; only message in thread
From: Gabriel Goller @ 2026-11-30 10:55 UTC (permalink / raw)
  To: pve-devel

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 <g.goller@proxmox.com>
---
 ...-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 <g.goller@proxmox.com>
+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 <g.goller@proxmox.com>





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

only message in thread, other threads:[~2026-11-30 10:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30 10:55 [PATCH ifupdown2] d/patches: apply accept-ra and autoconf at boot 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