mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net] ipv6: Add NETCONFA_FORCE_FORWARDING to netconf messages
@ 2026-10-23 10:59 Gabriel Goller
  2026-10-23 11:06 ` netdev-bot+sinfo
  2026-10-23 12:12 ` Fernando Fernandez Mancera
  0 siblings, 2 replies; 4+ messages in thread
From: Gabriel Goller @ 2026-10-23 10:59 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.

Fixes: f24987ef6959 ("ipv6: add `force_forwarding` sysctl to enable per-interface forwarding")
Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
---
 net/ipv6/addrconf.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index c8c0dd04982d..1b8caf6f4f16 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;

---
base-commit: 734bef548a96e8774d6eef5dfa2026c6edc4e80b
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] 4+ messages in thread

end of thread, other threads:[~2026-10-23 12:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-23 10:59 [PATCH net] ipv6: Add NETCONFA_FORCE_FORWARDING to netconf messages Gabriel Goller
2026-10-23 11:06 ` netdev-bot+sinfo
2026-10-23 11:15   ` Gabriel Goller
2026-10-23 12:12 ` Fernando Fernandez Mancera

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®