mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-04-30 08:40:43 +02:00
device: re-read initial hw-address before activating connection
Previously, we would only once read the initial hardware address during device realization. When a device activates, NetworkManager always sets the MAC address as configured in the cloned-mac-address setting -- or, if unspecified -- it falls back to use the permanent hardware-address instead. Later, when deactivating the device, the MAC address is reset to the "inital MAC address". This patch changes, that the "initial MAC address" is re-read every time before activating the device, contrary to reading it once in the beginning. This allows for a user to first start NetworkManager and later change the MAC address of the device. When activating the device, NM will reset the MAC address for the time the device is active. But when disconnecting, it resets to the user-changed value, not the value when NM was started. https://bugzilla.gnome.org/show_bug.cgi?id=708820
This commit is contained in:
parent
3704197d87
commit
2f05353d9e
1 changed files with 3 additions and 0 deletions
|
|
@ -11041,6 +11041,9 @@ _set_state_full (NMDevice *self,
|
|||
}
|
||||
}
|
||||
break;
|
||||
case NM_DEVICE_STATE_PREPARE:
|
||||
nm_device_update_initial_hw_address (self);
|
||||
break;
|
||||
case NM_DEVICE_STATE_NEED_AUTH:
|
||||
if (old_state > NM_DEVICE_STATE_NEED_AUTH) {
|
||||
/* Clean up any half-done IP operations if the device's layer2
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue