summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2019-03-08 18:26:30 +0100
committerBeniamino Galvani <bgalvani@redhat.com>2019-03-09 15:31:46 +0100
commit505d2adbc29d8a7d8b325fbff4f4bd8953afe805 (patch)
tree6fb6d3c39a489dba7fdc2cb83b63ac4d46b59344
parent39b72572087a1243725a48d47d53131591417aec (diff)
downloadNetworkManager-bg/restore-ipv6-on-up-rh1548237.tar.gz
device: restore IPv6 addresses when the link comes upbg/restore-ipv6-on-up-rh1548237
When the link goes down the kernel removes IPv6 addresses from the interface. In update_ext_ip_config() we detect that addresses were removed externally and drop them from various internal configurations. Don't do that if the link is down so that those addresses will be restored again on link up.
-rw-r--r--src/devices/nm-device.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 737175f2d6..7514fa784b 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -12784,17 +12784,17 @@ update_ext_ip_config (NMDevice *self, int addr_family, gboolean intersect_config
* by the user. */
if (priv->con_ip_config_6) {
nm_ip6_config_intersect (priv->con_ip_config_6, priv->ext_ip_config_6,
- TRUE,
+ is_up,
is_up,
default_route_metric_penalty_get (self, AF_INET6));
}
- intersect_ext_config (self, &priv->ac_ip6_config, TRUE, is_up);
- intersect_ext_config (self, &priv->dhcp6.ip6_config, TRUE, is_up);
- intersect_ext_config (self, &priv->dev2_ip_config_6, TRUE, is_up);
+ intersect_ext_config (self, &priv->ac_ip6_config, is_up, is_up);
+ intersect_ext_config (self, &priv->dhcp6.ip6_config, is_up, is_up);
+ intersect_ext_config (self, &priv->dev2_ip_config_6, is_up, is_up);
for (iter = priv->vpn_configs_6; iter; iter = iter->next)
- nm_ip6_config_intersect (iter->data, priv->ext_ip_config_6, TRUE, is_up, 0);
+ nm_ip6_config_intersect (iter->data, priv->ext_ip_config_6, is_up, is_up, 0);
if ( priv->ipv6ll_has
&& !nm_ip6_config_lookup_address (priv->ext_ip_config_6, &priv->ipv6ll_addr))