summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2021-02-01 16:32:01 +0100
committerBeniamino Galvani <bgalvani@redhat.com>2021-02-08 11:14:52 +0100
commit14600548158f8159847ba06a3f2f5eef2bb52881 (patch)
treef8fbd876f841012dfda7c9f1efe02780138efeeb
parent49ea978f0849ef9bcf3b0fd05fbb9fa05964206b (diff)
downloadNetworkManager-14600548158f8159847ba06a3f2f5eef2bb52881.tar.gz
device: preserve the DHCPv6 mode when renewing the lease
-rw-r--r--src/core/devices/nm-device.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c
index a2d4788162..e572e8143a 100644
--- a/src/core/devices/nm-device.c
+++ b/src/core/devices/nm-device.c
@@ -9948,13 +9948,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);