Fix: VPN is off but key is displayed in the status bar
There seem to be a narrow race condition in which it's possible to turn the VPN off where it won't null out the config. It's possible to make this happen by trying to migrate to a network that won't carry the VPN packets (UDP 4500 or ESP, respectively) and turning off the VPN while the IKE session is trying to establish. Alternatively, this might be a visibility issue where mConfig is nulled out by a thread, but the binder thread reading it from #getVpnConfig returns the old object, not yet nulled out. To fix this, make mConfig guarded by "this", which it almost was already. Bug: 289187571 Test: manual Turning off underlying networks, VPN stays "connected" in settings Adding a settings VPN, making sure the status is correct Try and fail to cause the race condition (cherry picked from https://android-review.googlesource.com/q/commit:25181986301828f8be5101bb6b08a72dda99b0ad) Merged-In: I1c19eb33f0c1d0f1ccca6ac17a709f8bc1ad9f94 Change-Id: I1c19eb33f0c1d0f1ccca6ac17a709f8bc1ad9f94
Loading
Please register or sign in to comment