mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-30 14:20:17 +01:00
device: update address in nm_device_update_from_platform_link()
When a software device is deactivated, normally we schedule a idle task to unrealize the device (delete_on_deactivate). However, if a new activation is enqueued on the same device (and that implies that the new profile is compatible with the device), then the idle task is not scheduled and the device will normally transition to the different states (disconnected, prepare, config, etc.). For ovs-interfaces, we remove the db entry on disconnect and that makes the link go away; however, we don't clear the hw_addr* fields of the device struct. When the new link appears, we try to set the new cloned MAC but the stale hw_addr field indicates that it's already set. Avoid this problem by updating the address as soon as the link appears. https://bugzilla.redhat.com/show_bug.cgi?id=2168477 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1532 (cherry picked from commitd403ac3d40) (cherry picked from commitb87fa496ce)
This commit is contained in:
parent
0c3ce61b02
commit
68da283941
1 changed files with 3 additions and 0 deletions
|
|
@ -7146,6 +7146,9 @@ nm_device_update_from_platform_link(NMDevice *self, const NMPlatformLink *plink)
|
|||
|
||||
ifindex_changed = _set_ifindex(self, plink ? plink->ifindex : 0, FALSE);
|
||||
|
||||
nm_device_update_hw_address(self);
|
||||
nm_device_update_permanent_hw_address(self, FALSE);
|
||||
|
||||
if (ifindex_changed)
|
||||
NM_DEVICE_GET_CLASS(self)->link_changed(self, plink);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue