device: enable checks against the MAC address of virtual devices

enables (back) matching against 802-3-ethernet.mac-address and
802-3-ethenet.mac-address-blacklist connection parameters
for MAC addresses belonging to virtual devices too.
This commit is contained in:
Francesco Giudici 2016-07-21 18:12:37 +02:00
parent 55b9fd46ee
commit ddc35f27eb

View file

@ -407,7 +407,7 @@ check_connection_compatible (NMDevice *device, NMConnection *connection)
if (!match_subchans (self, s_wired, &try_mac))
return FALSE;
perm_hw_addr = nm_device_get_permanent_hw_address (device, FALSE);
perm_hw_addr = nm_device_get_permanent_hw_address (device, TRUE);
mac = nm_setting_wired_get_mac_address (s_wired);
if (perm_hw_addr) {
if (try_mac && mac && !nm_utils_hwaddr_matches (mac, -1, perm_hw_addr, -1))