diff options
author | Thomas Haller <thaller@redhat.com> | 2019-06-18 09:38:38 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-06-18 09:41:50 +0200 |
commit | 29e6edccc6e56898ac65aacf67e7229f7b671815 (patch) | |
tree | 7efe2b618bc07ce74862a0d633c030c43bdfd7c3 | |
parent | 2bc3b77cca5150426d7dd6601697af0a6ff90549 (diff) | |
download | NetworkManager-bg/concheck-issue181.tar.gz |
Revert "Coerce connectivity "LIMITED" to "NONE" when device is disconnected"bg/concheck-issue181
NMConnectivity can now distinguish between LIMITED and NONE connectivity
and it does so based on whether IP addresses and routes are configured.
Previously, NMConnectivity would not differenciate between limited and
no connectivity, which is why NMDevice added some additional logic on top
to coerce LIMITED to NONE (if the device is not logically connected).
But note that the connectivity state (whether a network is reachable on
an interface) depends on what is configured in kernel and whether the
internet is reachable on that interface. It does not depend on the
logical device state.
On the other hand, whether the device is configured in a manner to have
connectivity depends on the logical state of the device (as NetworkManager
is configuring the device).
So, in many cases, the logical state and the connectivity state agree now,
but for the right reasons.
This reverts commit 4c4dbcb78d5b9427434c46c6952d6518b2e66562.
-rw-r--r-- | src/devices/nm-device.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 7a43b638b6..334912b058 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -2875,14 +2875,6 @@ concheck_update_state (NMDevice *self, state = NM_CONNECTIVITY_LIMITED; } else state = NM_CONNECTIVITY_NONE; - } else if (state == NM_CONNECTIVITY_LIMITED) { - /* NMConnectivity cannot distinguish between NONE and LIMITED connectivity. In both - * cases, it just failed to fetch the URL. - * - * NMDevice coerces a LIMITED state to NONE here, if the logical state of the device - * is disconnected. */ - if (priv->state <= NM_DEVICE_STATE_DISCONNECTED) - state = NM_CONNECTIVITY_NONE; } if (priv->concheck_x[IS_IPv4].state == state) { |