diff options
Diffstat (limited to 'src/core/devices/nm-device.c')
-rw-r--r-- | src/core/devices/nm-device.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c index ed840044c5..6639492ee5 100644 --- a/src/core/devices/nm-device.c +++ b/src/core/devices/nm-device.c @@ -11860,7 +11860,18 @@ _dev_ipac6_start(NMDevice *self) } if (nm_ndisc_get_node_type(priv->ipac6_data.ndisc) == NM_NDISC_NODE_TYPE_ROUTER) { - nm_device_sysctl_ip_conf_set(self, AF_INET6, "forwarding", "1"); + gs_free char *sysctl_value = NULL; + + sysctl_value = nm_device_sysctl_ip_conf_get(self, AF_INET6, "forwarding"); + if (!nm_streq0(sysctl_value, "1")) { + if (sysctl_value) { + g_hash_table_insert(priv->ip6_saved_properties, + "forwarding", + g_steal_pointer(&sysctl_value)); + } + nm_device_sysctl_ip_conf_set(self, AF_INET6, "forwarding", "1"); + } + priv->needs_ip6_subnet = TRUE; g_signal_emit(self, signals[IP6_SUBNET_NEEDED], 0); } @@ -11918,7 +11929,6 @@ _dev_sysctl_save_ip6_properties(NMDevice *self) { static const char *const ip6_properties_to_save[] = { "accept_ra", - "forwarding", "disable_ipv6", "hop_limit", "use_tempaddr", @@ -15838,7 +15848,6 @@ ip6_managed_setup(NMDevice *self) _dev_sysctl_set_disable_ipv6(self, FALSE); nm_device_sysctl_ip_conf_set(self, AF_INET6, "accept_ra", "0"); nm_device_sysctl_ip_conf_set(self, AF_INET6, "use_tempaddr", "0"); - nm_device_sysctl_ip_conf_set(self, AF_INET6, "forwarding", "0"); } static void |