diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c index 5a6728cfcd..c1253f1edd 100644 --- a/src/core/devices/nm-device.c +++ b/src/core/devices/nm-device.c @@ -4053,6 +4053,10 @@ _set_ifindex(NMDevice *self, int ifindex, gboolean is_ip_ifindex) _dev_l3_cfg_commit_type_reset(self); l3cfg_was_reset = TRUE; } + if (!priv->l3cfg) { + _cleanup_ip_pre(self, AF_INET, CLEANUP_TYPE_KEEP, FALSE); + _cleanup_ip_pre(self, AF_INET6, CLEANUP_TYPE_KEEP, FALSE); + } _LOGD(LOGD_DEVICE, "ifindex: set %sifindex %d%s%s%s%s%s%s",