From 707febe83b7763f21d06d645ecbdbdc949267fcd Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 8 Jun 2023 10:14:33 +0200 Subject: [PATCH] device: only remember "forwarding" sysctl the first time in _dev_ipac6_start() Fixes: 4c4830159459 ('device: don't reset "net.ipv6.conf.$IFACE.forwarding"') (cherry picked from commit 6050da93bda6f112cb3ad784f506ec67aa5aaff1) --- src/core/devices/nm-device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c index 19a740fa15..c168fa045d 100644 --- a/src/core/devices/nm-device.c +++ b/src/core/devices/nm-device.c @@ -11695,7 +11695,7 @@ _dev_ipac6_start(NMDevice *self) sysctl_value = nm_device_sysctl_ip_conf_get(self, AF_INET6, "forwarding"); if (!nm_streq0(sysctl_value, "1")) { - if (sysctl_value) { + if (sysctl_value && !g_hash_table_contains(priv->ip6_saved_properties, "forwarding")) { g_hash_table_insert(priv->ip6_saved_properties, "forwarding", g_steal_pointer(&sysctl_value));