From a2d96a5c2eba93061747b2aa57dd93e0f88321bc Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Wed, 27 Oct 2021 13:38:44 +0200 Subject: [PATCH] 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 --- src/core/devices/nm-device-vlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/devices/nm-device-vlan.c b/src/core/devices/nm-device-vlan.c index c1902d5eea..5709ad7b18 100644 --- a/src/core/devices/nm-device-vlan.c +++ b/src/core/devices/nm-device-vlan.c @@ -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); } }