From d64e577272d11e07a54d6bf8cabc27ab6a15c968 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Mon, 19 Nov 2018 18:33:45 +0100 Subject: [PATCH] wifi: do not persist the mac address on AddAndActivate If the client wants to pinpoint the connection to a particular device they can just add an appropriate property. That said, MAC address probably even doesn't count as appropriate; an interface name is supposed to stay stable and could be used in such cases. This fixes the case where "nmcli d wifi connect ..." ends up with a connection tied to a rather random device that happened to be around even without the "ifname" argument. --- src/devices/wifi/nm-device-wifi.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/devices/wifi/nm-device-wifi.c b/src/devices/wifi/nm-device-wifi.c index c8b9ee81d..282d35cc2 100644 --- a/src/devices/wifi/nm-device-wifi.c +++ b/src/devices/wifi/nm-device-wifi.c @@ -909,18 +909,6 @@ complete_connection (NMDevice *device, g_prefix_error (error, "%s.%s: ", NM_SETTING_WIRELESS_SETTING_NAME, NM_SETTING_WIRELESS_MAC_ADDRESS); return FALSE; } - } else { - guint8 tmp[ETH_ALEN]; - - /* Lock the connection to this device by default if it uses a - * permanent MAC address (ie not a 'locally administered' one) - */ - nm_utils_hwaddr_aton (perm_hw_addr, tmp, ETH_ALEN); - if (!(tmp[0] & 0x02)) { - g_object_set (G_OBJECT (s_wifi), - NM_SETTING_WIRELESS_MAC_ADDRESS, perm_hw_addr, - NULL); - } } }