GNOME Bugzilla – Bug 785281
dbus StateChanged signal behaviour changed since connectivity checks is per device
Last modified: 2017-10-20 09:18:03 UTC
Hi! I noticed with nm-1.8 on Fedora 26 that some of my applications no longer receive the dbus signal StateChanged, when the connectivity changes from connected-global to connected-site, or vice-versa. I understand that now, with commit 6b7e9f9b2, the function device_connectivity_changed() defines the NMManager global connectivity_state as the "best" state of the devices state with a default route. But what confuses me is the modification from commit 9d43869e4 in function find_best_device_state(), that causes the observed behavior modification compared to networkmanager from Fedora 25: @@ -804,11 +780,10 @@ find_best_device_state (NMManager *manager, gboolean *force_connectivity_check) case NM_ACTIVE_CONNECTION_STATE_ACTIVATED: if ( nm_active_connection_get_default (ac) || nm_active_connection_get_default6 (ac)) { - if (nm_connectivity_get_state (priv->connectivity) == NM_CONNECTIVITY_FULL) + if (priv->connectivity_state) return NM_STATE_CONNECTED_GLOBAL; best_state = NM_STATE_CONNECTED_SITE; - NM_SET_OUT (force_connectivity_check, TRUE); } else { if (best_state < NM_STATE_CONNECTING) best_state = NM_STATE_CONNECTED_LOCAL; Why not testing if (priv->connectivity == NM_CONNECTIVITY_FULL) to set the global state to NM_STATE_CONNECTED_GLOBAL ?
(In reply to Fabrice Bellet from comment #0) > Why not testing if (priv->connectivity == NM_CONNECTIVITY_FULL) to set the > global state to NM_STATE_CONNECTED_GLOBAL ? Yeah, 'if (priv->connectivity == NM_CONNECTIVITY_FULL)' looks correct to me. Lubomir, what do you think?
Fixed on master: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=ebb30c53cd636069a7391fed4f5b6e4dc970d861 and backported to nm-1-8: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?h=nm-1-8&id=9fea242f7251cba16a2c2a85d2b780acb9b6e916 Thanks!