mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-27 17:52:58 +02:00
gnetworkmonitornm: Consider NM_STATE_CONNECTED_SITE to be available
`NM_STATE_CONNECTED_SITE` is documented to mean that a default route is
available, but that the internet connectivity check failed. A default
route being available is compatible with the documentation for
GNetworkMonitor:network-available, which should be true if the system
has a default route for at least one of IPv4 and IPv6.
https://developer.gnome.org/NetworkManager/stable/nm-dbus-types.html
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Fixes: #1788
(cherry picked from commit e37f0cbd89
)
This commit is contained in:
committed by
Michael Catanzaro
parent
0f6191d02a
commit
1dfef5df6a
@@ -196,7 +196,7 @@ sync_properties (GNetworkMonitorNM *nm,
|
|||||||
}
|
}
|
||||||
else if (nm_state <= NM_STATE_CONNECTED_SITE)
|
else if (nm_state <= NM_STATE_CONNECTED_SITE)
|
||||||
{
|
{
|
||||||
new_network_available = FALSE;
|
new_network_available = TRUE;
|
||||||
new_network_metered = FALSE;
|
new_network_metered = FALSE;
|
||||||
if (nm_connectivity == NM_CONNECTIVITY_PORTAL)
|
if (nm_connectivity == NM_CONNECTIVITY_PORTAL)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user