android_packages_modules_Co.../tests/unit/java/com/android/server
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Chalard Jean 774dc3cd51 Tell netd about local networks
This patch does the following :
• When a network is local but the system doesn't support it,
  throw in registerNetworkAgent.
• When a network is local, tell netd about it.
• Add tests for the above, as well as a test for callbacks
  being sent correctly when the caps are set and not when
  they aren't and that the new keep connected flag is
  respected.

Telling netd about the network being local has it add two
routes that do not exist if the network is not local :
• One at PRIORITY_LOCAL_NETWORK matching unmarked sockets
  and looking up the table for the interface.
20000: from all fwmark 0x0/0x10000 lookup xxxx
• One at PRIORITY_EXPLICIT_NETWORK matching explicitly on
  network 99, so that dnsmasq traffic and any OEM traffic
  marked for network 99 flowing there.
16000: from all fwmark 0x10063/0x1ffff iif lo lookup xxxx
IMPLICIT_NETWORK and EXPLICIT_NETWORK rules are installed
by connectivity service as a matter of course whether the
network is local or not.

See commit If8729fc6f3716a580c936584b851bc38000b5de5 for
implementation details of this mechanic.

There is no need to implement anything in particular for the
new connected reason, as the current implementation will
already keep it connected. A new test makes sure of that.

Test: FrameworksNetTests
      CtsNetTestCases
      FrameworksNetIntegrationTests
      NetworkStackTests
      NetworkStaticLibTests
      TetheringTests
      MtsTetheringTestLatestSdk
      TetheringIntegrationTests
Change-Id: I6fb7dfe4c232eea8cac9ac268897ddb36bb794d1
2023-10-13 14:40:38 +09:00
..
connectivity Merge "Stop the created handler threads on the tests" into main 2023-10-12 07:13:30 +00:00
connectivityservice Tell netd about local networks 2023-10-13 14:40:38 +09:00
ethernet Connectivity Tests: join handler thread after calling quitSafely 2023-03-17 01:01:09 -07:00
net Stop the created handler threads on the tests 2023-10-12 10:25:03 +08:00
BpfNetMapsTest.java Split BpfNetMaps constants and utilities into standalone classes 2023-08-29 08:20:10 +00:00
ConnectivityServiceTest.java Merge changes Ib24809ec,Id9d26435 into main 2023-10-11 12:03:37 +00:00
IpSecServiceParameterizedTest.java Require IPSEC_TUNNEL_MIGRATION feature flag to migrate transforms 2022-12-21 23:12:48 +00:00
IpSecServiceRefcountedResourceTest.java Add some non-connectivity-module-test back to ConnectivityCoverageTests 2022-05-27 07:16:46 +00:00
IpSecServiceTest.java Experimental support for IPv6 UDP encap. 2023-02-08 15:05:07 +09:00
LegacyTypeTrackerTest.kt Build ethernet framework source into framework-connectivity-tiramisu 2022-03-14 14:06:35 +00:00
NetIdManagerTest.kt Address comments on aosp/1781202 2022-08-17 07:11:55 +00:00
NsdServiceTest.java Correct isLegacy metric data 2023-09-12 01:20:00 +00:00
VpnManagerServiceTest.java Update VPN tests to mock out createAttributionContext 2023-06-12 18:06:47 +00:00
VpnTestBase.java Test VPN app exclusion 2022-06-29 06:15:41 +00:00