From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
To: Gabriel Goller <g.goller@proxmox.com>,
David Ahern <dsahern@kernel.org>,
Ido Schimmel <idosch@nvidia.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] ipv6: reset all.force_forwarding when disabling all.forwarding
Date: Tue, 10 Nov 2026 18:34:50 +0100 [thread overview]
Message-ID: <1eb85d22-7d2b-460c-82f6-2af15a4875dc@6wind.com> (raw)
In-Reply-To: <20261109-ipv6_reset_all-v1-1-815dfd508246@proxmox.com>
Le 09/11/2026 à 16:53, Gabriel Goller a écrit :
> Disabling all.forwarding resets force_forwarding on every interface, but
> leaves all.force_forwarding set:
>
> # sysctl -wq net.ipv6.conf.all.forwarding=1
> # sysctl -wq net.ipv6.conf.all.force_forwarding=1
> # sysctl -wq net.ipv6.conf.all.forwarding=0
> # sysctl net.ipv6.conf.dummy1.force_forwarding
> net.ipv6.conf.dummy1.force_forwarding = 0
> # sysctl net.ipv6.conf.all.force_forwarding
> net.ipv6.conf.all.force_forwarding = 1
>
> Writing 1 to all.force_forwarding afterwards is ignored because the
> value did not change, so the interfaces are not re-enabled.
>
> Reset all.force_forwarding too and notify netconf listeners.
>
> Suggested-by: Ido Schimmel <idosch@nvidia.com>
> Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
There is the same effect if an interface entry is reset:
$ sysctl -wq net.ipv6.conf.all.force_forwarding=1
$ sysctl net.ipv6.conf.ntfp1.force_forwarding net.ipv6.conf.all.force_forwarding
net.ipv6.conf.ntfp1.force_forwarding = 1
net.ipv6.conf.all.force_forwarding = 1
$ sysctl -wq net.ipv6.conf.ntfp1.force_forwarding=0
$ sysctl net.ipv6.conf.ntfp1.force_forwarding net.ipv6.conf.all.force_forwarding
net.ipv6.conf.ntfp1.force_forwarding = 0
net.ipv6.conf.all.force_forwarding = 1
$ sysctl -wq net.ipv6.conf.all.force_forwarding=1
$ sysctl net.ipv6.conf.ntfp1.force_forwarding net.ipv6.conf.all.force_forwarding
net.ipv6.conf.ntfp1.force_forwarding = 0
net.ipv6.conf.all.force_forwarding = 1
Maybe the new value should be applied whatever the old value was for the 'all'
entry (like for net.ipv6.conf.all.forwarding).
Note that, it is the same for ipv4 forwarding:
$ sysctl -wq net.ipv4.conf.all.forwarding=1
$ sysctl net.ipv4.conf.all.forwarding net.ipv4.conf.ntfp1.forwarding
net.ipv4.conf.all.forwarding = 1
net.ipv4.conf.ntfp1.forwarding = 1
$ sysctl -wq net.ipv4.conf.ntfp1.forwarding=0
$ sysctl net.ipv4.conf.all.forwarding net.ipv4.conf.ntfp1.forwarding
net.ipv4.conf.all.forwarding = 1
net.ipv4.conf.ntfp1.forwarding = 0
$ sysctl -wq net.ipv4.conf.all.forwarding=1
$ sysctl net.ipv4.conf.all.forwarding net.ipv4.conf.ntfp1.forwarding
net.ipv4.conf.all.forwarding = 1
net.ipv4.conf.ntfp1.forwarding = 0
but not for ipv6 forwarding:
$ sysctl -wq net.ipv6.conf.all.forwarding=1
$ sysctl net.ipv6.conf.all.forwarding net.ipv6.conf.ntfp1.forwarding
net.ipv6.conf.all.forwarding = 1
net.ipv6.conf.ntfp1.forwarding = 1
$ sysctl -wq net.ipv6.conf.ntfp1.forwarding=0
$ sysctl net.ipv6.conf.all.forwarding net.ipv6.conf.ntfp1.forwarding
net.ipv6.conf.all.forwarding = 1
net.ipv6.conf.ntfp1.forwarding = 0
$ sysctl -wq net.ipv6.conf.all.forwarding=1
$ sysctl net.ipv6.conf.all.forwarding net.ipv6.conf.ntfp1.forwarding
net.ipv6.conf.all.forwarding = 1
net.ipv6.conf.ntfp1.forwarding = 1
prev parent reply other threads:[~2026-11-10 17:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 15:53 Gabriel Goller
2026-11-10 17:34 ` Nicolas Dichtel [this message]
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=1eb85d22-7d2b-460c-82f6-2af15a4875dc@6wind.com \
--to=nicolas.dichtel@6wind.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@kernel.org \
--cc=g.goller@proxmox.com \
--cc=horms@kernel.org \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®