diff options
-rw-r--r-- | libnm/nm-device-ethernet.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libnm/nm-device-ethernet.c b/libnm/nm-device-ethernet.c index 65d28d0332..825ed7b392 100644 --- a/libnm/nm-device-ethernet.c +++ b/libnm/nm-device-ethernet.c @@ -227,6 +227,11 @@ connection_compatible (NMDevice *device, NMConnection *connection, GError **erro perm_addr = nm_device_ethernet_get_permanent_hw_address (NM_DEVICE_ETHERNET (device)); s_mac = nm_setting_wired_get_mac_address (s_wired); if (perm_addr) { + /* Virtual devices will have empty permanent addr but they should not be excluded + * from the MAC address check specified in the connection */ + if (*perm_addr == 0) + perm_addr = nm_device_ethernet_get_hw_address (NM_DEVICE_ETHERNET (device)); + if (!nm_utils_hwaddr_valid (perm_addr, ETH_ALEN)) { g_set_error (error, NM_DEVICE_ERROR, NM_DEVICE_ERROR_FAILED, _("Invalid device MAC address %s."), perm_addr); |