From b5d63191cabc4b60744d743c28bc2f9a2419e711 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Thu, 23 Oct 2025 11:19:52 +0900 Subject: [PATCH] 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. --- src/network/networkd-sysctl.c | 2 ++ 1 file changed, 2 insertions(+) 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); -- 2.47.3