After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 785281 - dbus StateChanged signal behaviour changed since connectivity checks is per device
dbus StateChanged signal behaviour changed since connectivity checks is per d...
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
1.8.x
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-07-22 20:06 UTC by Fabrice Bellet
Modified: 2017-10-20 09:18 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Fabrice Bellet 2017-07-22 20:06:54 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 ?
Comment 1 Beniamino Galvani 2017-07-27 14:42:08 UTC
(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?