mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-07-21 18:24:49 +00:00
devices: fix default ethernet connection code
Creation of default wired connections got broken by an incomplete rebase of dcbw/internal-device-factories after danw/libnm-props landed. https://bugzilla.gnome.org/show_bug.cgi?id=737273
This commit is contained in:
parent
687f319201
commit
94c3f1f70f
|
@ -1473,7 +1473,6 @@ new_default_connection (NMDevice *self)
|
|||
NMSetting *setting;
|
||||
const char *hw_address;
|
||||
char *defname, *uuid;
|
||||
GByteArray *mac;
|
||||
|
||||
if (!nm_config_get_ethernet_can_auto_default (nm_config_get (), self))
|
||||
return NULL;
|
||||
|
@ -1501,12 +1500,9 @@ new_default_connection (NMDevice *self)
|
|||
|
||||
/* Lock the connection to the device */
|
||||
setting = nm_setting_wired_new ();
|
||||
g_object_set (setting, NM_SETTING_WIRED_MAC_ADDRESS, hw_address, NULL);
|
||||
nm_connection_add_setting (connection, setting);
|
||||
|
||||
mac = nm_utils_hwaddr_atoba (hw_address, ETH_ALEN);
|
||||
g_object_set (setting, NM_SETTING_WIRED_MAC_ADDRESS, mac, NULL);
|
||||
g_byte_array_unref (mac);
|
||||
|
||||
return connection;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue