vlan: preserve external IP changes on parent MAC update

When the parent MAC is updated, a VLAN device also updates its MAC and
then performs a new commit to restore IP configuration. This should
not remove addresses added externally. Change the commit type to
UPDATE.

Fixes-test: @static_route_persists_mac_change
This commit is contained in:
Beniamino Galvani 2021-10-27 13:38:44 +02:00
parent 96850933bb
commit a2d96a5c2e

View file

@ -115,7 +115,7 @@ parent_hwaddr_maybe_changed(NMDevice *parent, GParamSpec *pspec, gpointer user_d
/* When changing the hw address the interface is taken down,
* removing the IPv6 configuration; reapply it.
*/
nm_device_l3cfg_commit(device, NM_L3_CFG_COMMIT_TYPE_REAPPLY, FALSE);
nm_device_l3cfg_commit(device, NM_L3_CFG_COMMIT_TYPE_UPDATE, FALSE);
}
}