diff options
author | Antonio Larrosa <antonio.larrosa@gmail.com> | 2019-03-21 11:08:36 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-04-03 11:25:37 +0200 |
commit | 4c4dbcb78d5b9427434c46c6952d6518b2e66562 (patch) | |
tree | f8b05465ac0f60f3904479482d1cffbbe2e285ac | |
parent | 9a8fe5f339f5fbe7e6679dbcad7ec95ab5ba658d (diff) | |
download | NetworkManager-4c4dbcb78d5b9427434c46c6952d6518b2e66562.tar.gz |
Coerce connectivity "LIMITED" to "NONE" when device is disconnected
If the device is disconnected it can't have any connectivity, so we can
set it to NONE instead of LIMITED.
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues/138
Related: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/99
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/100
-rw-r--r-- | src/devices/nm-device.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 3959bd7d2d..60162f4399 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -2822,7 +2822,8 @@ concheck_update_state (NMDevice *self, int addr_family, state = NM_CONNECTIVITY_LIMITED; } else state = NM_CONNECTIVITY_NONE; - } + } else if (state == NM_CONNECTIVITY_LIMITED && priv->state <= NM_DEVICE_STATE_DISCONNECTED) + state = NM_CONNECTIVITY_NONE; if (priv->concheck_x[IS_IPv4].state == state) { /* we got a connectivty update, but the state didn't change. If we were probing, |