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 762154 - [review] lr/conn-device-ifname: prevent connections from being available on devices of different name
[review] lr/conn-device-ifname: prevent connections from being available on d...
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-02-16 16:47 UTC by Lubomir Rintel
Modified: 2016-02-17 18:29 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Lubomir Rintel 2016-02-16 16:47:14 UTC
The device now checks the manager that constructs the name using the device factory. For virtual devices, manager resolves the parent.

This fixes the situation where the vlans devices could get mixed up and makes the name determination more straightforward by always delegating it to the factory.

https://cgit.freedesktop.org/NetworkManager/NetworkManager/log/?h=lr/conn-device-ifname
Comment 1 Thomas Haller 2016-02-16 17:19:43 UTC
>> device-factory: always use the factory to determine the connection's 

the change to nm-device-team.c does not belong to this commit.

    
>> device: move the interface name check from manager
    
+    gs_free char *conn_iface = nm_manager_get_connection_iface (nm_manager_get 
+                                                                connection,
+                                                                NULL, NULL);

I think we call check_connection_compatible() *a lot*. So this adds extra pressure because it involves an extra lookup for the factory and the parent device. Might be not an issue, could be.

You could optimize that, by not overwriting get_connection_iface() for devices without parent device. This could shortcut the common case significantly.
Comment 2 Lubomir Rintel 2016-02-17 14:20:52 UTC
Updated the branch.