From: Yu Watanabe Date: Thu, 23 Oct 2025 02:19:52 +0000 (+0900) Subject: network/sysctl: logs when per-link IPMasquerade= setting changes the global IPv6Forwa... X-Git-Tag: v259-rc1~222 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5d63191cabc4b60744d743c28bc2f9a2419e711;p=thirdparty%2Fsystemd.git network/sysctl: logs when per-link IPMasquerade= setting changes the global IPv6Forwarding= setting All other cases, settings on different interfaces are completely independent. But IPMasquerade=yes on an interface enables the global IPv6Forwarding= setting, and hence affects other interfaces. Let's log about that. Prompted by https://github.com/systemd/systemd/issues/39304#issuecomment-3430382233. --- diff --git a/src/network/networkd-sysctl.c b/src/network/networkd-sysctl.c index 6433a77a5e6..b29d49d79db 100644 --- a/src/network/networkd-sysctl.c +++ b/src/network/networkd-sysctl.c @@ -377,6 +377,8 @@ static int link_set_ip_forwarding(Link *link, int family) { if (FLAGS_SET(link->network->ip_masquerade, AF_TO_ADDRESS_FAMILY(family)) && link->manager->ip_forwarding[family == AF_INET6] < 0) { + log_link_notice(link, "IPMasquerade= is enabled on the interface, enabling the global IPv6Forwarding= setting, which may affect NDisc and DHCPv6 client on other interfaces."); + link->manager->ip_forwarding[family == AF_INET6] = true; manager_set_ip_forwarding(link->manager, family);