device: update the address type in nm_device_hw_addr_set_cloned()
Commit029a0a21ea
("device: split out cloned MAC decision from nm_device_hw_addr_set_cloned()") accidentally removed the assignment of the new device @hw_addr_type, which then was left to HW_ADDR_TYPE_UNSET. As a consequence, we never restored the initial MAC address when the connection was deactivated. Fix this. Fixes:029a0a21ea
(cherry picked from commit166988264f
)
This commit is contained in:
@@ -13358,8 +13358,10 @@ nm_device_hw_addr_set_cloned (NMDevice *self, NMConnection *connection, gboolean
|
|||||||
if (preserve)
|
if (preserve)
|
||||||
return nm_device_hw_addr_reset (self, detail);
|
return nm_device_hw_addr_reset (self, detail);
|
||||||
|
|
||||||
if (hwaddr)
|
if (hwaddr) {
|
||||||
|
priv->hw_addr_type = type;
|
||||||
return _hw_addr_set (self, hwaddr, "set-cloned", detail);
|
return _hw_addr_set (self, hwaddr, "set-cloned", detail);
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user