Fix a bug where non-VPN networks would update VPN uids.
Previously, non VPNs would not be created when updateVpnUids() is called inside handleRegisterNetworkAgent. Because the network is not created, netd would refuse to set the UIDs with an error. Now that networks are created immediately with the QUEUE_NETWORK_AGENT_EVENTS_IN_SYSTEM_SERVER flag, the network is created and netd does set the UID for any network as if they were a VPN. This results in the UID having the wrong default network, which in turns prevents it from accessing Internet. Test: new test in this patch Bug: 408717088 Flag: EXEMPT bugfix Change-Id: If68ea7d60919c0c7e177480f6167196381e00f35
This commit is contained in:
parent
ee2c4e164a
commit
97e6901697
1 changed files with 93 additions and 1 deletions
|
|
@ -9573,7 +9573,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
|||
nai.notifyRegistered(networkMonitor);
|
||||
NetworkInfo networkInfo = nai.networkInfo;
|
||||
updateNetworkInfo(nai, networkInfo);
|
||||
updateVpnUids(nai, null, nai.networkCapabilities);
|
||||
if (nai.isVPN()) updateVpnUids(nai, null, nai.networkCapabilities);
|
||||
nai.processEnqueuedMessages(mTrackerHandler::handleMessage);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue