mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 00:00:08 +01:00
dhcp: remove the address synchronously on lease 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 (cherry picked from commit514a3cb610) (cherry picked from commitf2e61addc4)
This commit is contained in:
parent
55812963fd
commit
a0825a8fd5
1 changed files with 1 additions and 1 deletions
|
|
@ -10927,7 +10927,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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue