From 4c587561c631dca33df19c32d26617b9654b4490 Mon Sep 17 00:00:00 2001 From: Wen Liang Date: Wed, 14 Dec 2022 13:37:47 -0500 Subject: device: clear the previous lease with dhcp disabled during reapply --- src/core/devices/nm-device.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c index 8d433d335d..780e586188 100644 --- a/src/core/devices/nm-device.c +++ b/src/core/devices/nm-device.c @@ -12214,6 +12214,9 @@ activate_stage3_ip_config(NMDevice *self) _dev_ipmanual_start(self); } + if (!nm_streq(ipv4_method, NM_SETTING_IP4_CONFIG_METHOD_AUTO)) + nm_clear_l3cd(priv->l3cds[L3_CONFIG_DATA_TYPE_DHCP_X(TRUE)].d); + activate_stage3_ip_config_for_addr_family(self, AF_INET, ipv4_method); activate_stage3_ip_config_for_addr_family(self, AF_INET6, ipv6_method); } -- cgit v1.2.1