all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Gabriel Goller <g.goller@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH ifupdown2] d/patches: apply accept-ra and autoconf at boot
Date: Mon, 30 Nov 2026 11:55:11 +0100	[thread overview]
Message-ID: <20261130-d_patches_apply-v1-1-0c4e9d0c906b@proxmox.com> (raw)

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>





                 reply	other threads:[~2026-11-30 10:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261130-d_patches_apply-v1-1-0c4e9d0c906b@proxmox.com \
    --to=g.goller@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal