File 0001-Coerce-connectivity-LIMITED-to-NONE-when-device-is-d.patch of Package NetworkManager.15726
From 3e53521b50b7150118fbb729def0a2a1364c5aae Mon Sep 17 00:00:00 2001
From: Antonio Larrosa <antonio.larrosa@gmail.com>
Date: Thu, 21 Mar 2019 11:08:36 +0100
Subject: [PATCH] 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.
Fixes #138
---
src/devices/nm-device.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: NetworkManager-1.20.0/src/devices/nm-device.c
===================================================================
--- NetworkManager-1.20.0.orig/src/devices/nm-device.c
+++ NetworkManager-1.20.0/src/devices/nm-device.c
@@ -2887,7 +2887,8 @@ concheck_update_state (NMDevice *self,
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,