- Nov 16, 2023
-
-
Hansen Kurli authored
The profile is modified within startLegacyVpnPrivileged(), e.g. ipsecCaCert, ipsecUserCert. This causes subsequent calls from callers such as LockdownVpnTracker to fail. Add a new test to ensure the VpnProfile is not modified in startLegacyVpn. Add testClone in VpnProfileTest. Bug: 190572822 Bug: 309591931 Test: atest FrameworksNetTests, test before and after fix. Test: Manual test Change-Id: Id090e0dd3b9e74a7461ae90e68c41e802b458744
-
- Nov 02, 2023
- Nov 01, 2023
-
-
Junyu Lai authored
-
Junyu Lai authored
Test: atest ConnectivityCoverageTests:android.net.connectivity.com.android.server.net.NetworkStatsServiceTest (with debug code that dump all threads at the end of tests) Fix: 308544001 Change-Id: I597054633bbb008ffd0edebe34dcf6935958aa5d
-
Hansen Kurli authored
* changes: Add Log.wtf when keepalive metrics are unexpected. Add dump of KeepaliveStatsTracker
-
Hansen Kurli authored
To debug unexpected keepalive metrics values, print the built metrics in a Log.wtf before writing it to statsd. Bug: 297292877 Test: atest FrameworksNetTests Change-Id: I5fffc13721e50e28f24b0da12a961364f3f77e21
-
Hansen Kurli authored
To debug unexpected metrics values, print the built metrics into the connectivity dump. Sample of the added log dump: KeepaliveStatsTracker enabled: true # android.net.connectivity.com.android.metrics.Dailykeepalive InfoReported@3293424e automatic_keepalive_requests: 2 distinct_user_count: 1 duration_per_num_of_keepalive { duration_for_num_of_keepalive { keepalive_active_durations_msec: 36 keepalive_registered_durations_msec: 36 num_of_keepalive: 0 } duration_for_num_of_keepalive { keepalive_active_durations_msec: 9 keepalive_registered_durations_msec: 6 num_of_keepalive: 1 } duration_for_num_of_keepalive { keepalive_active_durations_msec: 7 keepalive_registered_durations_msec: 10 num_of_keepalive: 2 } } keepalive_lifetime_per_carrier { keepalive_lifetime_for_carrier { active_lifetime_msec: 23 carrier_id: -1 intervals_msec: 10000 lifetime_msec: 26 transport_types: 1 } } keepalive_requests: 2 uid: 10097 Bug: 297292877 Test: adb shell dumpsys connectivity Test: New test testDumpDoesNotCrash() Change-Id: Ifc076a8dce734e9c175f1b1f28e1c448b9a792e5
-
Chiachang Wang authored
-
Paul Hu authored
-
Junyu Lai authored
-
Ken Chen authored
-
Ken Chen authored
-
Ken Chen authored
* changes: [Test] for libcom.android.tethering.dns_helper.so Add a library for DNS resolver to read bpf maps
-
Junyu Lai authored
This change adds a DataSaverStatusTracker, which is a helper class to continuously track data saver status through NPMS public API and intents. ConnectivityManager#isUidNetworkingBlocked would use this cached information along with bpf maps to decide whether networking of an uid is blocked. Test: atest FrameworksNetTests:android.net.connectivity.android.net.BpfNetMapsReaderTest Test: atest ConnectivityCoverageTests:android.net.connectivity.android.net.ConnectivityManagerTest Bug: 297836825 Change-Id: I7e13191759430f3ea1f4dec7facc02f16be7146d
-
Chiachang Wang authored
The created handler threads should be quit after the tests to prevent memory leakage. Also, this commit updates the method used to close the created HandlerThread to do it correctly. Bug: 308537727 Test: atest ConnectivityCoverageTests Change-Id: I3715a73a9142418c05f98bc95e275f97161ab3cd
-
- Oct 31, 2023
-
-
Ken Chen authored
Resolv_integration_test needs the function to toggle Data Saver settings in BPF map. Bug: 288340533 Test: atest resolv_integration_test Change-Id: I1725d3c8c6fc641b855c935d7289a99f78dd5933
-
Ken Chen authored
Make ADnsHelper_isUidNetworkingBlocked() to reference 'metered' information and Data Saver related BPF maps to make the final decision. Bug: 288340533 Test: atest dns_helper_unit_test Change-Id: I51b1dadd56a8d6fda3f8b18d64740e52b76e1bfe
-
Ken Chen authored
Enable test in postsubmit. According to go/test-mapping-slo-guide, the test needs to meet postsubmit SLO before adding it to presubmit. Bug: 288340533 Test: run presubmit Change-Id: Id5fae55fa0cb7c7b15e183bbea66c7a139360d95
-
Ken Chen authored
Exercise the BpfReader::isUidNetworkingBlocked(). Bug: 288340533 Test: atest dns_helper_unit_test Change-Id: Icc889a6a9649e991cba222427f9b8d4f5ee3b325
-
Ken Chen authored
The library provides an init function and an API for DNS resolver to query whether the application is allowed to send DNS query based on BPF maps settings. Bug: 288340533 Test: atest dns_helper_unit_test (with test CL) Change-Id: Ibfb383bfb074da2104a25aa4f04ebc32b22d11da
-
Sudheer Shanka authored
-
Sudheer Shanka authored
When 'set-inactive' command is used, it is possible for the test app to get into the NEVER bucket as it wouldn't be recorded as used by the user in some cases. Bug: 298816567 Test: atest tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java Change-Id: If2667a07629b38395d0fed99771488d0900caf18
-
Yuyang Huang authored
-
Motomu Utsumi authored
-
Motomu Utsumi authored
-
Jean Chalard authored
-
Jean Chalard authored
* changes: Stop MockVpn from extending Vpn class. Remove unused method calls of MockVpn Create local NetworkCapabilites for MockVpn.
-
Ken Chen authored
-
Yuyang Huang authored
-
Junyu Lai authored
This is needed for data stall detection mechanism in NetworkStack to get the information about whether the network is blocked for a given uid and conditions. Because the API will be called frequently from NetworkStack to resolve all status for all uids on the device, the API cannot call into the service which creates IPC. Instead, the API need to directly access bpf maps in the user process to retrieve the status. In this case the user process is the network stack, the access control is provided by linux file permission and selinux. Test: atest FrameworksNetTests:android.net.connectivity.android.net.BpfNetMapsReaderTest Test: atest FrameworksNetTests:android.net.connectivity.android.net.ConnectivityManagerTest NO_IFTTT=Refactor only change for firewall chains definitions Bug: 297836825 Change-Id: Iaf983b71ec98cbfe5152dcfade8a3120f938f135
-
Motomu Utsumi authored
testV4MappedV6Address fails without change in Struct.java Bug: 295800201 Test: atest ConnectivityCoverageTests Change-Id: I4a40bc47b051860c6420f211491e2ecd34c1d732
-
Motomu Utsumi authored
Bug: 295800201 Test: NetworkStaticLibTests Change-Id: Ia10e7dd14edfabe0edf5c9e12ceae54a1ff88d13
-
Ken Chen authored
Dns Resolver needs to know whether a network is metered when checking if DNS requests will be blocked by Data Saver. Bug: 288340533 Test: atest FrameworksNetTests Change-Id: Ia5822dc522c766c7815680003c7ba275d15ccaff
-
Ken Chen authored
-
Hansen Kurli authored
-
Yuyang Huang authored
* Update getRawOffloadPayload() with @NonNull annotation. * Log the error object directly instead of logging the error message. * Use Arrays.copyOfRange() instead of System.arraycopy(). * Remove the unnecessary escape of mPacketCreationBuffer member variable in MdnsReplySender. Bug: 308079421 Test: TH Change-Id: I8c805bfe1fc1ae1d9a8abfab498059bda05710ff
-
Ken Chen authored
The information is needed by modules who want to know whether a specific UID is blocked by Data Saver feature. 1. Add a one-element map data_saver_enabled_map. 2. Update current data saver setting to the map. Bug: 288340533 Test: atest FrameworksNetTests:android.net.connectivity.com.android.serv er.BpfNetMapsTest Test: atest bpf_existence_test Change-Id: I981da4b569247c33cba2d365cb6f2691f673474e
-
- Oct 30, 2023
-
-
Chalard Jean authored
In particular, this fixes a bug where a non-validated destroyed network can't get disconnected after it's replaced by another non-validated network because CS thinks it should keep it in case it validates and beats the replacement network. Test: new test for this : CSDestroyedNetworkTests Change-Id: I5d7e413624d6fca28b06484e5369cd17e4a599a4
-
Ken Chen authored
1. At present, the transportTypes in NetworkCapabilities have been passed into DnsManager::updateTransportsForNetwork() as a parameter. In the following CL, we also need to pass the 'metered' (also in NetworkCapabilities) as a parameter to the function. Instead of passing the members of NetworkCapabilities one by one, it is better to pass the entire NetworkCapabilities. 2. Rename updateTransportsForNetwork() to updateCapabilitiesForNetwork(). Bug: 288340533 Test: presubmit Change-Id: I0966124f87b12c1d5a2eaee681885c3d5c7f74dc
-