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 696722 - nm-settings.c::have_connection_for_device() doesn't take interface name locking into account
nm-settings.c::have_connection_for_device() doesn't take interface name locki...
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: 2013-03-27 17:31 UTC by Dan Williams
Modified: 2013-04-11 18:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
settings: consider :interface-name in default wired connection matching (2.94 KB, patch)
2013-04-11 14:46 UTC, Dan Winship
committed Details | Review

Description Dan Williams 2013-03-27 17:31:58 UTC
Noticed this while reviewing danw/config; but I don't think this function looks at nm_setting_connection_get_interface_name() and thus it will ignore any connection that's locked to a device via interface name, which could cause a default DHCP connection for a device that has an interface-locked connection.
Comment 1 Dan Winship 2013-04-11 14:46:22 UTC
Created attachment 241256 [details] [review]
settings: consider :interface-name in default wired connection matching

The code to check if an ethernet device had a matching connection was
not taking NMSettingConnection:interface-name into account, meaning it
might think a device had a matching connection when that connection
actually only matched a different device.

Fix this by calling nm_setting_connection_get_interface_name() rather
than nm_connection_get_virtual_iface_name() (which would always be
NULL for ethernet connections anyway).

Also, simplify the code a bit.
Comment 2 Dan Williams 2013-04-11 16:52:00 UTC
Review of attachment 241256 [details] [review]:

Looks good.
Comment 3 Dan Winship 2013-04-11 18:56:57 UTC
Attachment 241256 [details] pushed as f1d31e3 - settings: consider :interface-name in default wired connection matching