File 0001-Coerce-connectivity-LIMITED-to-NONE-when-device-is-d.patch of Package NetworkManager

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.50.0/src/core/devices/nm-device.c
===================================================================
--- NetworkManager-1.50.0.orig/src/core/devices/nm-device.c
+++ NetworkManager-1.50.0/src/core/devices/nm-device.c
@@ -6338,7 +6338,8 @@ concheck_update_state(NMDevice
                 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 connectivity update, but the state didn't change. If we were probing,
openSUSE Build Service is sponsored by