* [PATCH net-next v2] ipv6: Add NETCONFA_FORCE_FORWARDING to netconf messages
@ 2026-11-04 9:46 Gabriel Goller
2026-11-09 9:05 ` Ido Schimmel
2026-11-10 9:40 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 5+ messages in thread
From: Gabriel Goller @ 2026-11-04 9:46 UTC (permalink / raw)
To: David Ahern, Ido Schimmel, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Simon Horman, Nicolas Dichtel
Cc: netdev, linux-kernel, Gabriel Goller
Since force_forwarding was added, changing the sysctl sends an
RTM_NEWNETCONF notification of type NETCONFA_FORCE_FORWARDING, but
inet6_netconf_fill_devconf() never emits the attribute. Listeners only
receive NETCONFA_IFINDEX without the new value, and RTM_GETNETCONF
replies and dumps omit it as well.
Also send a notification when disabling all.forwarding resets
force_forwarding on an interface, which previously happened silently.
Fixes: f24987ef6959 ("ipv6: add `force_forwarding` sysctl to enable per-interface forwarding")
Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
---
iproute2 patch here:
https://lore.kernel.org/netdev/20261028-ip_netconf_show-v1-1-a20fc6b20025@proxmox.com/
Changes in v2:
- Emit when net.ipv6.conf.all.forwarding is disabled (thanks @Ido Schimmel)
- Rebase onto net-next
- Link to v1: https://lore.kernel.org/20261023-ipv6_add_netconfa-v1-1-94d14b07d621@proxmox.com
---
net/ipv6/addrconf.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index c8c0dd04982d..1df6c1db472f 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -529,6 +529,9 @@ static int inet6_netconf_msgsize_devconf(int type)
if (all || type == NETCONFA_IGNORE_ROUTES_WITH_LINKDOWN)
size += nla_total_size(4);
+ if (all || type == NETCONFA_FORCE_FORWARDING)
+ size += nla_total_size(4);
+
return size;
}
@@ -578,6 +581,11 @@ static int inet6_netconf_fill_devconf(struct sk_buff *skb, int ifindex,
READ_ONCE(devconf->ignore_routes_with_linkdown)) < 0)
goto nla_put_failure;
+ if ((all || type == NETCONFA_FORCE_FORWARDING) &&
+ nla_put_s32(skb, NETCONFA_FORCE_FORWARDING,
+ READ_ONCE(devconf->force_forwarding)) < 0)
+ goto nla_put_failure;
+
out:
nlmsg_end(skb, nlh);
return 0;
@@ -863,8 +871,12 @@ static void addrconf_forward_change(struct net *net, __s32 newf)
if (idev) {
int changed = (!idev->cnf.forwarding) ^ (!newf);
/* Disabling all.forwarding sets 0 to force_forwarding for all interfaces */
- if (newf == 0)
+ if (newf == 0 && idev->cnf.force_forwarding) {
WRITE_ONCE(idev->cnf.force_forwarding, 0);
+ inet6_netconf_notify_devconf(net, RTM_NEWNETCONF,
+ NETCONFA_FORCE_FORWARDING,
+ dev->ifindex, &idev->cnf);
+ }
WRITE_ONCE(idev->cnf.forwarding, newf);
if (changed)
---
base-commit: 7b6ab4dbc156e2f96419715130b3d5738a306c93
base-tree: git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git main
change-id: 20261023-ipv6_add_netconfa-b87b66b35272
Best regards,
--
Gabriel Goller <g.goller@proxmox.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next v2] ipv6: Add NETCONFA_FORCE_FORWARDING to netconf messages
2026-11-04 9:46 [PATCH net-next v2] ipv6: Add NETCONFA_FORCE_FORWARDING to netconf messages Gabriel Goller
@ 2026-11-09 9:05 ` Ido Schimmel
2026-11-10 9:09 ` Paolo Abeni
2026-11-10 10:23 ` Gabriel Goller
2026-11-10 9:40 ` patchwork-bot+netdevbpf
1 sibling, 2 replies; 5+ messages in thread
From: Ido Schimmel @ 2026-11-09 9:05 UTC (permalink / raw)
To: Gabriel Goller
Cc: David Ahern, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Simon Horman, Nicolas Dichtel, netdev, linux-kernel
On Wed, Nov 04, 2026 at 10:46:10AM +0100, Gabriel Goller wrote:
> Since force_forwarding was added, changing the sysctl sends an
> RTM_NEWNETCONF notification of type NETCONFA_FORCE_FORWARDING, but
> inet6_netconf_fill_devconf() never emits the attribute. Listeners only
> receive NETCONFA_IFINDEX without the new value, and RTM_GETNETCONF
> replies and dumps omit it as well.
>
> Also send a notification when disabling all.forwarding resets
> force_forwarding on an interface, which previously happened silently.
>
> Fixes: f24987ef6959 ("ipv6: add `force_forwarding` sysctl to enable per-interface forwarding")
Fixes tag on net-next is only valid when the blamed commit is only in
net-next, but maybe Paolo / Jakub will agree to strip it, so wait with
v3.
> Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
There's a report from Sashiko [1] about a pre-existing issue:
all.force_forwarding not being cleared when all.forwarding is cleared.
# ip link add name dummy1 type dummy
# 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
[1] https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261104-ipv6_add_netconfa-v2-1-6f660990062f@proxmox.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next v2] ipv6: Add NETCONFA_FORCE_FORWARDING to netconf messages
2026-11-09 9:05 ` Ido Schimmel
@ 2026-11-10 9:09 ` Paolo Abeni
2026-11-10 10:23 ` Gabriel Goller
1 sibling, 0 replies; 5+ messages in thread
From: Paolo Abeni @ 2026-11-10 9:09 UTC (permalink / raw)
To: Ido Schimmel, Gabriel Goller
Cc: David Ahern, David S. Miller, Eric Dumazet, Jakub Kicinski,
Simon Horman, Nicolas Dichtel, netdev, linux-kernel
On 11/9/26 10:05, Ido Schimmel wrote:
> On Wed, Nov 04, 2026 at 10:46:10AM +0100, Gabriel Goller wrote:
>> Since force_forwarding was added, changing the sysctl sends an
>> RTM_NEWNETCONF notification of type NETCONFA_FORCE_FORWARDING, but
>> inet6_netconf_fill_devconf() never emits the attribute. Listeners only
>> receive NETCONFA_IFINDEX without the new value, and RTM_GETNETCONF
>> replies and dumps omit it as well.
>>
>> Also send a notification when disabling all.forwarding resets
>> force_forwarding on an interface, which previously happened silently.
>>
>> Fixes: f24987ef6959 ("ipv6: add `force_forwarding` sysctl to enable per-interface forwarding")
>
> Fixes tag on net-next is only valid when the blamed commit is only in
> net-next, but maybe Paolo / Jakub will agree to strip it, so wait with
> v3.
I agreed the tag should be stripped here, but just for completeness general
guidance above is slightly changed again. Due to the incoming fixes influx
we are redirecting actual, low prio, fixes from net to net-next, retaining
the fixes tag.
>> Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
>
> Reviewed-by: Ido Schimmel <idosch@nvidia.com>
>
> There's a report from Sashiko [1] about a pre-existing issue:
> all.force_forwarding not being cleared when all.forwarding is cleared.
>
> # ip link add name dummy1 type dummy
> # 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
>
> [1] https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261104-ipv6_add_netconfa-v2-1-6f660990062f@proxmox.com
Thanks, I agree that is separate topic, again IMHO suitable for net-next.
/P
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next v2] ipv6: Add NETCONFA_FORCE_FORWARDING to netconf messages
2026-11-04 9:46 [PATCH net-next v2] ipv6: Add NETCONFA_FORCE_FORWARDING to netconf messages Gabriel Goller
2026-11-09 9:05 ` Ido Schimmel
@ 2026-11-10 9:40 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-11-10 9:40 UTC (permalink / raw)
To: Gabriel Goller
Cc: dsahern, idosch, davem, edumazet, kuba, pabeni, horms,
nicolas.dichtel, netdev, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Wed, 04 Nov 2026 10:46:10 +0100 you wrote:
> Since force_forwarding was added, changing the sysctl sends an
> RTM_NEWNETCONF notification of type NETCONFA_FORCE_FORWARDING, but
> inet6_netconf_fill_devconf() never emits the attribute. Listeners only
> receive NETCONFA_IFINDEX without the new value, and RTM_GETNETCONF
> replies and dumps omit it as well.
>
> Also send a notification when disabling all.forwarding resets
> force_forwarding on an interface, which previously happened silently.
>
> [...]
Here is the summary with links:
- [net-next,v2] ipv6: Add NETCONFA_FORCE_FORWARDING to netconf messages
https://git.kernel.org/netdev/net-next/c/2d916a8c307c
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next v2] ipv6: Add NETCONFA_FORCE_FORWARDING to netconf messages
2026-11-09 9:05 ` Ido Schimmel
2026-11-10 9:09 ` Paolo Abeni
@ 2026-11-10 10:23 ` Gabriel Goller
1 sibling, 0 replies; 5+ messages in thread
From: Gabriel Goller @ 2026-11-10 10:23 UTC (permalink / raw)
To: Ido Schimmel
Cc: David Ahern, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Simon Horman, Nicolas Dichtel, netdev, linux-kernel
On 09.11.2026 11:05, Ido Schimmel wrote:
> On Wed, Nov 04, 2026 at 10:46:10AM +0100, Gabriel Goller wrote:
> > Since force_forwarding was added, changing the sysctl sends an
> > RTM_NEWNETCONF notification of type NETCONFA_FORCE_FORWARDING, but
> > inet6_netconf_fill_devconf() never emits the attribute. Listeners only
> > receive NETCONFA_IFINDEX without the new value, and RTM_GETNETCONF
> > replies and dumps omit it as well.
> >
> > Also send a notification when disabling all.forwarding resets
> > force_forwarding on an interface, which previously happened silently.
> >
> > Fixes: f24987ef6959 ("ipv6: add `force_forwarding` sysctl to enable per-interface forwarding")
>
> Fixes tag on net-next is only valid when the blamed commit is only in
> net-next, but maybe Paolo / Jakub will agree to strip it, so wait with
> v3.
>
> > Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
>
> Reviewed-by: Ido Schimmel <idosch@nvidia.com>
>
> There's a report from Sashiko [1] about a pre-existing issue:
> all.force_forwarding not being cleared when all.forwarding is cleared.
>
> # ip link add name dummy1 type dummy
> # 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
>
> [1] https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261104-ipv6_add_netconfa-v2-1-6f660990062f@proxmox.com
Thanks, sent a patch:
https://lore.kernel.org/netdev/20261109-ipv6_reset_all-v1-1-815dfd508246@proxmox.com/
Gabriel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-11-10 10:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-04 9:46 [PATCH net-next v2] ipv6: Add NETCONFA_FORCE_FORWARDING to netconf messages Gabriel Goller
2026-11-09 9:05 ` Ido Schimmel
2026-11-10 9:09 ` Paolo Abeni
2026-11-10 10:23 ` Gabriel Goller
2026-11-10 9:40 ` patchwork-bot+netdevbpf
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®