diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2022-02-14 09:39:35 +0100 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2022-02-16 15:12:52 +0100 |
commit | f15b3f15a7c8401f60df16a6327c53d345aff0fa (patch) | |
tree | b5256ad95799069bab43e1b7b45aa23d29dc9909 | |
parent | 9a090fdf7b33098f129d79164e2d78b8cc07f8f6 (diff) | |
download | NetworkManager-f15b3f15a7c8401f60df16a6327c53d345aff0fa.tar.gz |
device: delay IP ready state until all objects are committed
Don't progress to the IP ready state until all objects are committed
to platform. Note that l3cfg has a 20 seconds timeout after which
unavailable objects are considered "definitely unavailable" and are
removed from the list.
Fixes-test: @ipv6_routes_with_src
https://bugzilla.redhat.com/show_bug.cgi?id=2043133
-rw-r--r-- | src/core/devices/nm-device.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c index 9debf3c748..bebfc4c3ab 100644 --- a/src/core/devices/nm-device.c +++ b/src/core/devices/nm-device.c @@ -3055,6 +3055,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; @@ -3186,6 +3187,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) @@ -3213,7 +3218,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), @@ -3221,6 +3226,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" : "", |