mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-07 02:00:15 +01:00
wifi: renew dynamic IP configuration after roaming
There are some APs that require a DHCP transaction before allowing other traffic. This is meant to improve security by preventing the use of static addresses. Currently we don't renew DHCP after roaming to a new AP and this can lead to broken connectivity with APs that implement the check described above. Also, even if unlikely, the new AP could be in a different layer 3 network and so the old address could be no longer valid. Renew dynamic IP configuration after we detect the supplicant decided to roam to a new AP. Note that we only trigger a DHCP client restart; the DHCP client already implements the logic to renew the previous address and fall back to a full request in case of NAK or timeout. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/449
This commit is contained in:
parent
f1af22452d
commit
5423a92b0f
1 changed files with 9 additions and 0 deletions
|
|
@ -2564,6 +2564,15 @@ supplicant_iface_notify_current_bss (NMSupplicantInterface *iface,
|
|||
new_bssid ?: "(none)",
|
||||
(new_ssid_s = _nm_utils_ssid_to_string (new_ssid)));
|
||||
|
||||
if (new_bssid) {
|
||||
/* The new AP could be in a different layer 3 network
|
||||
* and so the old DHCP lease could be no longer valid.
|
||||
* Also, some APs (e.g. Cisco) can be configured to drop
|
||||
* all traffic until DHCP completes. To support such
|
||||
* cases, renew the lease when roaming to a new AP. */
|
||||
nm_device_update_dynamic_ip_setup (NM_DEVICE (self));
|
||||
}
|
||||
|
||||
set_current_ap (self, new_ap, TRUE);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue