diff options
| author | Michael Biebl <biebl@debian.org> | 2022-02-19 17:19:17 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2022-02-19 17:19:17 +0100 |
| commit | e3f2ee969d065d2971170563c8aef77d5a0d39b9 (patch) | |
| tree | 94454d4e2fe0955c09516f18dc4e84a6cf7139fa /src/core/devices/nm-device.c | |
| parent | 2f94dba7385fd0e0ef19a06eb4a2fcf6c43d7946 (diff) | |
New upstream version 1.35.92 upstream/1.35.92
Diffstat (limited to 'src/core/devices/nm-device.c')
| -rw-r--r-- | src/core/devices/nm-device.c | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c index 696c0df8..aed580ab 100644 --- a/src/core/devices/nm-device.c +++ b/src/core/devices/nm-device.c @@ -3057,6 +3057,7 @@ _dev_ip_state_check(NMDevice *self, int addr_family) gboolean s_is_started = FALSE; gboolean s_is_failed = FALSE; gboolean s_is_pending = FALSE; + gboolean has_tna = FALSE; gboolean v_bool; NMDeviceIPState ip_state; NMDeviceIPState ip_state_other; @@ -3188,6 +3189,10 @@ _dev_ip_state_check(NMDevice *self, int addr_family) &s_is_pending, &s_is_failed); + has_tna = priv->l3cfg && nm_l3cfg_has_temp_not_available_obj(priv->l3cfg, addr_family); + if (has_tna) + s_is_pending = TRUE; + if (s_is_failed) ip_state = NM_DEVICE_IP_STATE_FAILED; else if (s_is_pending) @@ -3215,7 +3220,7 @@ got_ip_state: nm_assert(!priv->ip_data_4.is_ignore); _LOGT_ip(addr_family, - "check-state: state %s => %s, is_failed=%d, is_pending=%d, is_started=%d, " + "check-state: state %s => %s, is_failed=%d, is_pending=%d, is_started=%d temp_na=%d, " "may-fail-4=%d, may-fail-6=%d;" "%s;%s%s%s%s%s%s;%s%s%s%s%s%s%s%s", nm_device_ip_state_to_string(priv->ip_data_x[IS_IPv4].state), @@ -3223,6 +3228,7 @@ got_ip_state: s_is_failed, s_is_pending, s_is_started, + has_tna, _prop_get_ipvx_may_fail_cached(self, AF_INET, IS_IPv4 ? &may_fail : &may_fail_other), _prop_get_ipvx_may_fail_cached(self, AF_INET6, !IS_IPv4 ? &may_fail : &may_fail_other), priv->ip_data_4.is_disabled ? " disabled4" : "", @@ -3932,6 +3938,9 @@ _dev_l3_cfg_notify_cb(NML3Cfg *l3cfg, const NML3ConfigNotifyData *notify_data, N AF_INET6, NM_L3CFG_CHECK_READY_FLAGS_IP6_DAD_READY, NULL)) { + if (nm_l3cfg_has_temp_not_available_obj(priv->l3cfg, AF_INET6)) + _dev_l3_cfg_commit(self, FALSE); + nm_clear_l3cd(&priv->ipac6_data.l3cd); _dev_ipac6_set_state(self, NM_DEVICE_IP_STATE_READY); _dev_ip_state_check_async(self, AF_INET6); @@ -9821,6 +9830,14 @@ _dev_ipmanual_check_ready(NMDevice *self) _dev_ipmanual_set_state(self, addr_family, NM_DEVICE_IP_STATE_FAILED); _dev_ip_state_check_async(self, AF_UNSPEC); } else if (ready) { + if (priv->ipmanual_data.state_x[IS_IPv4] != NM_DEVICE_IP_STATE_READY + && nm_l3cfg_has_temp_not_available_obj(priv->l3cfg, addr_family)) { + /* Addresses with pending ACD/DAD are a possible cause for the + * presence of temporarily-not-available objects. Once all addresses + * are ready, retry to commit those unavailable objects. */ + _dev_l3_cfg_commit(self, FALSE); + } + _dev_ipmanual_set_state(self, addr_family, NM_DEVICE_IP_STATE_READY); _dev_ip_state_check_async(self, AF_UNSPEC); } @@ -10455,14 +10472,14 @@ nm_device_copy_ip6_dns_config(NMDevice *self, NMDevice *from_device) l3cd_src = priv_src->l3cds[L3_CONFIG_DATA_TYPE_AC_6].d; } if (l3cd_src) { - const char *const *strvarr; - const struct in6_addr *const *addrs; - guint n; - guint i; + const char *const *strvarr; + const struct in6_addr *addrs; + guint n; + guint i; addrs = nm_l3_config_data_get_nameservers(l3cd_src, AF_INET6, &n); for (i = 0; i < n; i++) - nm_l3_config_data_add_nameserver(l3cd, AF_INET6, addrs[i]); + nm_l3_config_data_add_nameserver(l3cd, AF_INET6, &addrs[i]); strvarr = nm_l3_config_data_get_searches(l3cd_src, AF_INET6, &n); for (i = 0; i < n; i++) |