[PATCH iproute2-next] ip: netconf: show IPv6 force_forwarding

DORMANTno replies

From: Gabriel Goller <hidden>
Date: 2026-10-28 12:11:03
Subsystem: the rest · Maintainer: Linus Torvalds

Allow users to inspect and monitor force_forwarding, which enables
per-interface IPv6 forwarding independently of the global forwarding
setting.

The sysctl was introduced with kernel commit
f24987ef6959 ("ipv6: add `force_forwarding` sysctl to enable per-interface forwarding").

Signed-off-by: Gabriel Goller <redacted>
---
 ip/ipnetconf.c        | 4 ++++
 man/man8/ip-netconf.8 | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/ip/ipnetconf.c b/ip/ipnetconf.c
index 57bb99d1f061..915d84ffa403 100644
--- a/ip/ipnetconf.c
+++ b/ip/ipnetconf.c
@@ -109,6 +109,10 @@ int print_netconf(struct rtnl_ctrl_data *ctrl, struct nlmsghdr *n, void *arg)
 		print_on_off(PRINT_ANY, "forwarding", "forwarding %s ",
 			     rta_getattr_u32(tb[NETCONFA_FORWARDING]));
 
+	if (tb[NETCONFA_FORCE_FORWARDING])
+		print_on_off(PRINT_ANY, "force_forwarding", "force_forwarding %s ",
+			     rta_getattr_u32(tb[NETCONFA_FORCE_FORWARDING]));
+
 	if (tb[NETCONFA_RP_FILTER]) {
 		__u32 rp_filter = rta_getattr_u32(tb[NETCONFA_RP_FILTER]);
 
diff --git a/man/man8/ip-netconf.8 b/man/man8/ip-netconf.8
index 7fe3e5f35803..558c14eb0a45 100644
--- a/man/man8/ip-netconf.8
+++ b/man/man8/ip-netconf.8
@@ -15,8 +15,8 @@ The
 .B ip netconf
 utility can monitor IPv4 and IPv6 parameters (see
 .BR "/proc/sys/net/ipv[4|6]/conf/[all|DEV]/" ")"
-like forwarding, rp_filter, proxy_neigh, ignore_routes_with_linkdown
-or mc_forwarding status.
+like forwarding, force_forwarding (IPv6 only), rp_filter, proxy_neigh,
+ignore_routes_with_linkdown or mc_forwarding status.
 
 If no interface is specified, the entry
 .B all
---
base-commit: 204a721033556114c81c47d00375f2d52e98e463
change-id: 20261028-ip_netconf_show-458e9b193239

Best regards,
--  
Gabriel Goller [off-list ref]

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help