mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-23 17:50:07 +01:00
dhcp: nettools: start from init-reboot phase when reusing address
If we know the address used previously, also tell the client to start from the init-reboot phase, so that it will start with a DHCP request instead of a discover.
This commit is contained in:
parent
dd3114deb0
commit
6af6f70d81
1 changed files with 3 additions and 1 deletions
|
|
@ -1311,8 +1311,10 @@ ip4_start (NMDhcpClient *client,
|
|||
sd_dhcp_lease_get_address (lease, &last_addr);
|
||||
}
|
||||
|
||||
if (last_addr.s_addr)
|
||||
if (last_addr.s_addr) {
|
||||
n_dhcp4_client_probe_config_set_requested_ip (config, last_addr);
|
||||
n_dhcp4_client_probe_config_set_init_reboot (config, TRUE);
|
||||
}
|
||||
|
||||
/* Add requested options */
|
||||
for (i = 0; _nm_dhcp_option_dhcp4_options[i].name; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue