No description. Add one?
  • Java 78%
  • Kotlin 11.8%
  • AIDL 4.4%
  • C++ 3.7%
  • C 1.5%
  • Other 0.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Lorenzo Colitti 275ee60963 Never satisfy requests with networks that aren't connected.
Currently, NetworkAgentInfo#satisfies determines whether a
network exists (and should satisfy requests) based on
|created|, not |everConnected|. This is theoretically incorrect
because networks in CONNECTING state or similar must never
satisfy requests or call callbacks.

This cannot happen for requests. New requests are only added to
networks by NetworkAgentInfo#addRequest, which is only called by
computeNetworkReassignment via updateSatisfiersForRematchRequest,
which skips any network with everConnected = false. It can
potentially happen to listens though.

Also, this cannot ever happen for physical networks, because for
physical networks, created is set at the same time as
everConnected, the first time they enter CONNECTED state.

In theory, this can happen for VPNs since ag/988402 , which
changed the code to create VPN networks as soon as they enter
CONNECTING state. That CL added the everConnected boolean to
NetworkAgentInfo but did not update the satisfies and
satisfiesImmutableCapabilitiesOf checks to use everConnected.
In practice, even for VPNs this is very unlikely, since VPNs
advance from CONNECTING to CONNECTED essentially immediately.
Even if they didn't, sending callbacks before they enter
CONNECTED state would be incorrect because the app receiving
the callback would have no way of knowing that the network is
actually not yet connected.

With this change, some checks for everConnected become spurious,
because a network with everConnected=false cannot satisfy either
requests or listens. Remove these checks.

Test: extensively tested by existing ConnectivityServiceTest
Change-Id: I024bb2b85bc57228d53e69a7707c7ce7ac756259
2022-08-24 15:34:44 +09:00
bpf_progs split TCP control packet error into IPv4 vs IPv6 2022-08-10 19:34:35 +00:00
common Move struct CookieTagMap{Key, Value} to Connectivity/common 2022-07-23 03:18:55 +08:00
framework Removing SuppressLint on NetworkRequst 2022-08-12 16:10:29 -07:00
framework-t Merge "Cleanup constructor of NetworkStats#Entry" 2022-08-05 07:46:28 +00:00
nearby Add more owners for Nearby code. 2022-07-20 19:30:36 -07:00
netd make sure netd can open all bpf programs 2022-08-07 22:18:37 +00:00
service Never satisfy requests with networks that aren't connected. 2022-08-24 15:34:44 +09:00
service-t Merge changes I6b9a2fa1,Ia5ddbdc5 2022-08-12 20:43:50 +00:00
tests Merge "ethernet: replace netd link observer with NetlinkMonitor" 2022-08-12 15:55:44 +00:00
Tethering Merge "TestOnly: reduce duplicated start/stop hotspot verification" 2022-08-10 16:13:51 +00:00
tools Add jarjar rules generator 2022-06-14 09:11:27 +00:00
.gitignore Add a .gitignore in packages/modules/Connectivity. 2020-11-27 18:09:21 +09:00
OWNERS Add additional IPsec owners 2021-12-08 06:57:51 +00:00
OWNERS_core_networking add prohr to OWNERS_core_networking 2022-01-11 18:54:31 +00:00
OWNERS_core_networking_xts Add an OWNERS_core_networking_xts for CTS/GTS/... and use it. 2022-01-18 01:42:39 +00:00
PREUPLOAD.cfg Enable tethering to perform its own hidden API processing 2021-06-28 23:41:38 +01:00
TEST_MAPPING Add back compat config for NSD 2022-07-27 19:53:25 +09:00