tui: fix the "Device" entry on currently-active virtual devices

Virtual device types can only have an ifname in the "Device" entry,
but the code was accidentally filling in the MAC address too if the
device currently existed (which then made the entry value invalid).
This commit is contained in:
Dan Winship 2013-12-17 11:31:23 -05:00
parent 41ada32127
commit 2940ef7a63

View file

@ -269,7 +269,7 @@ update_entry (NmtDeviceEntry *deventry)
if (!ifname && mac_device)
ifname = nm_device_get_iface (mac_device);
if (!mac && ifname_device)
if (!mac && ifname_device && (priv->hardware_type != G_TYPE_NONE))
g_object_get (G_OBJECT (ifname_device), "hw-address", &mac, NULL);
if (ifname_device && mac_device && ifname_device != mac_device) {