🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
3 messages
3 total messages Started by Gabriel Goller Wed, 04 Nov 2026 09:46
[PATCH net-next v2] ipv6: Add NETCONFA_FORCE_FORWARDING to netconf messages
#10901
Author: Gabriel Goller
Date: Wed, 04 Nov 2026 09:46
73 lines
10009 bytes
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>
Re: [PATCH net-next v2] ipv6: Add NETCONFA_FORCE_FORWARDING to netconf messages
#13768
Author: patchwork-bot+netdevbpf
Date: Tue, 10 Nov 2026 09:40
26 lines
8841 bytes
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
Re: [PATCH net-next v2] ipv6: Add NETCONFA_FORCE_FORWARDING to netconf messages
#13803
Author: Gabriel Goller
Date: Tue, 10 Nov 2026 10:23
41 lines
9162 bytes
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads