From 93fceb9a5ffef85c468085c0384538ddd8b8feea Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Thu, 29 Jan 2026 20:53:05 +0000 Subject: [PATCH] doc: update IPv6 forwarding documentation Signed-off-by: Joachim Wiberg --- doc/ip.md | 11 +++++------ src/confd/src/interfaces.c | 4 ++++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/doc/ip.md b/doc/ip.md index 1f79b121..69d105de 100644 --- a/doc/ip.md +++ b/doc/ip.md @@ -415,13 +415,12 @@ admin@example:/> ## IPv6 forwarding -Due to how the Linux kernel manages IPv6 forwarding, we can not fully -control it per interface via this setting like how IPv4 works. Instead, -IPv6 forwarding is globally enabled when at least one interface enable -forwarding, otherwise it is disabled. +Forwarding must be enabled on an interface for it to route IPv6 +traffic (static or dynamic). The setting is per-interface and works +the same way as IPv4 forwarding. -The following table shows the system IPv6 features that the `forwarding` -setting control when it is *Enabled* or *Disabled: +The following table shows the IPv6 features that the `forwarding` +setting controls when it is *Enabled* or *Disabled*: | **IPv6 Feature** | **Enabled** | **Disabled** | |:-----------------------------------------|:------------|:-------------| diff --git a/src/confd/src/interfaces.c b/src/confd/src/interfaces.c index 86639ebd..022b4448 100644 --- a/src/confd/src/interfaces.c +++ b/src/confd/src/interfaces.c @@ -335,6 +335,10 @@ static int netdag_gen_sysctl(struct dagger *net, err = err ? : netdag_gen_sysctl_setting(net, ifname, &sysctl, 1, "0", node, "net.ipv4.conf.%s.forwarding", ifname); + /* + * Use force_forwarding for IPv6 (available since Linux 6.17) which provides + * true per-interface control, unlike the legacy forwarding sysctl. + */ node = lydx_get_descendant(lyd_child(dif), "ipv6", "forwarding", NULL); err = err ? : netdag_gen_sysctl_setting(net, ifname, &sysctl, 1, "0", node, "net.ipv6.conf.%s.force_forwarding", ifname);