From eacd1dacfa17c4cfa62f804d3744554cb477e25a Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Mon, 1 Feb 2021 16:32:01 +0100 Subject: [PATCH] device: preserve the DHCPv6 mode when renewing the lease (cherry picked from commit 14600548158f8159847ba06a3f2f5eef2bb52881) --- src/devices/nm-device.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 4144c2a1b9..de93f2233c 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -9862,13 +9862,16 @@ gboolean nm_device_dhcp6_renew(NMDevice *self, gboolean release) { NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE(self); + NMNDiscDHCPLevel mode; g_return_val_if_fail(priv->dhcp_data_6.client != NULL, FALSE); _LOGI(LOGD_DHCP6, "DHCPv6 lease renewal requested"); /* Terminate old DHCP instance and release the old lease */ + mode = priv->dhcp6.mode; dhcp6_cleanup(self, CLEANUP_TYPE_DECONFIGURE, release); + priv->dhcp6.mode = mode; /* Start DHCP again on the interface */ return dhcp6_start(self, FALSE);