diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2024-05-10 16:57:40 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2024-05-10 17:54:36 +0200 |
commit | 2fbbf0e1ceed37d6826348bfe1752250290702b5 (patch) | |
tree | ba105a7a6516ca880f99ffd16911ad7e65b84a8c | |
parent | 0e64af01cc520ac3e44a815d7050a65e8816496a (diff) |
dhcp: remove the address synchronously on lease expirybg/dhcp-remove-addr-on-expiry
When the lease expires, the DHCP client emits a LEASE_UPDATE event
with a NULL l3cd. After returning from the handler, it sends
immediately a DHCP DISCOVER message to try to get a new lease.
It is important that when the DISCOVER gets sent the address is no
longer configured on the interface. Otherwise, the server could see
that it is already in use and assign a different one. Therefore,
remove the address synchronously when handling the event.
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1532
-rw-r--r-- | src/core/devices/nm-device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c index b96adefbd0..a46f1555b5 100644 --- a/src/core/devices/nm-device.c +++ b/src/core/devices/nm-device.c @@ -11053,7 +11053,7 @@ _dev_ipdhcpx_notify(NMDhcpClient *client, const NMDhcpClientNotifyData *notify_d priv->l3cfg, _dev_l3_config_data_tag_get(priv, L3_CONFIG_DATA_TYPE_DHCP_X(IS_IPv4)), dhcp_l3cd)) { - _dev_l3_cfg_commit(self, FALSE); + _dev_l3_cfg_commit(self, TRUE); } goto lease_update_out; } |