WifiStateMachine: Probe neighbours only when roaming
Whenever a WPA group rekeying happens, the wpa_supplicant state goes
from CONNETED to GROUP_HANDSHAKE and back to CONNETED. This makes
WifiStateMachine call IpManager.confirmConfiguration() which, in this
scenario, leads to the NUD_FAILED state and subsequent disconnection.
Instead of calling IpManager.confirmConfiguration() whenever we reach
the CONNECTED state, do it only if we are roaming. According to the
comments in the code and commit c4a5807e031412bd4529daa46baa8b1bdb0629
("Do some DNAv4/DNAv6 -style probing on roaming.") this is probably
how the probing was intended to be done.
Change-Id: I6d1b6b13be546f2ce9f22c34bd0f4f83faf9bd27
diff --git a/service/java/com/android/server/wifi/WifiStateMachine.java b/service/java/com/android/server/wifi/WifiStateMachine.java
index c0ff345..c8e64e6 100644
--- a/service/java/com/android/server/wifi/WifiStateMachine.java
+++ b/service/java/com/android/server/wifi/WifiStateMachine.java
@@ -5693,7 +5693,7 @@
// If we have COMPLETED a connection to a BSSID, start doing
// DNAv4/DNAv6 -style probing for on-link neighbors of
// interest (e.g. routers); harmless if none are configured.
- if (state == SupplicantState.COMPLETED) {
+ if (isRoaming() && state == SupplicantState.COMPLETED) {
mIpManager.confirmConfiguration();
}
break;