- Feb 12, 2021
-
-
Maciej Żenczykowski authored
Test: atest TetheringCoverageTests now passes, TreeHugger Signed-off-by:
Maciej Żenczykowski <maze@google.com> Change-Id: I0d83de14784f323400a83ce282cae1a3e7b4b396
-
- Feb 10, 2021
-
-
Sudheer Shanka authored
SubscriptionManager.setSubscriptionOverrideUnmetered() has been updated to add NET_CAPABILITY_TEMPORARILY_NOT_METERED instead of NET_CAPABILITY_NOT_METERED. So, we can't rely on that for changing the meteredness. Bug: 179664982 Test: atest tests/cts/hostside/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java Test: atest tests/cts/hostside/src/com/android/cts/net/HostsideNetworkCallbackTests.java Change-Id: I4163b2f9c6f80b4e639d9977ef7e2b444ab12e81 Merged-In: I4163b2f9c6f80b4e639d9977ef7e2b444ab12e81
-
Lorenzo Colitti authored
Merge changes from topics "vpnmove-getconnectionowneruid", "vpnmove-systemdefaultcallback", "vpnmove-vpntransportinfo" * changes: Accept both pre-S and post-S errors in getConnectionOwnerUid. Add CTS coverage for VpnTransportInfo. Add test coverage for registerSystemDefaultNetworkCallback.
-
Lorenzo Colitti authored
On R and below, when an app that is not the active VPN app calls getConnectionOwnerUid, a SecurityException is thrown. On S and above, the method just returns INVALID_UID, which is what would happen if the app was the active VPN app but was not authorized to find that particular socket. Accept both behaviours. Bug: 173331190 Test: atest HostsideVpnTests#testGetConnectionOwnerUidSecurity passes on R and S Change-Id: Ie6de2ef505b0d7bc253c55215a698aeaa210785c
-
Lorenzo Colitti authored
Bug: 173331190 Test: FrameworksNetTests HostsideVpnTests CtsNetTestCases Change-Id: I77d866270c63f1078a2a01941b2271d4338aa178
-
Lorenzo Colitti authored
Test: dumpsys tethering bpf Change-Id: Ie21fee8ad12430ecd21c3903587d25b8dd2a96c4
-
Lorenzo Colitti authored
This CL adds the counters collected by the tethering programs to the output of "dumpsys tethering bpf". The counter names are fetched by JNI code at startup and then read by the debugging code on demand. Example from my device: Forwarding errors: TCP_CONTROL_PACKET: 67 NON_GLOBAL_SRC: 13 NON_GLOBAL_DST: 17 LOCAL_SRC_DST: 7 Test: manual (debug-only code) Change-Id: I7ec7992612556a4bca5f1b6bb52c655d6d870201
-
- Feb 09, 2021
-
-
Lorenzo Colitti authored
Currently, the dump methods open BpfMap objects and never close them. This leaks filedescriptors, and if dump is called often enough, will crash the networkstack process. Fix this by using try-with-resources statements that automatically close the map when exiting the try block. Change the signature of BpfMap#close from "throws Exception" to "throws ErrnoException" since it does not throw any other type of checked exceptions. Test: "lsof | grep network_st" while running "dumpsys tethering bpf" in a loop Change-Id: I66c407454c2715bf41bf3a2e81bd582f9ea5a905
-
Lorenzo Colitti authored
Bug: 173331190 Test: atest CtsNetTestCases:NetworkAgentTest Change-Id: I3ce51ca253a8bd06408137f6f9ed4056a832cb43
-
Lorenzo Colitti authored
-
Lorenzo Colitti authored
Test: m Change-Id: I53961e1e16bf90d76f16b9416c55b65e8374373d
-
Maciej Żenczykowski authored
* changes: Add error counters for various failures. Add a bpf_tethering_headers lib used by the programs and JNI.
-
Lorenzo Colitti authored
Currently, debugging the tethering programs is not easy because in case of any failure they simply return TC_ACT_OK. This CL adds a number of counters that the program can increment in the case of interesting events such as malformed packets. At the moment the counters are stored in a global tethering error map, which is an ARRAY map of 32-bit counters. This should not take up much space because there are only a dozen of these. We might not need all of these counters. In future CLs we can reduce the number of counters, or perhaps move them to a map of maps so as to have separate counters on a per-interface basis. Test: manual Change-Id: I3fcd7eb8d318700092949ff2f39987bf4ba3656c
-
Lorenzo Colitti authored
This provides a place to store common definitions that can be used by both the programs and by JNI code in the tethering module. Over time much of the tethering-specific code in bpf_shared.h could move here. Test: m Bug: 177884581 Change-Id: I4bf2c762d61cd5db003d59880e6bf7d107ff1a07
-
Treehugger Robot authored
-
- Feb 08, 2021
-
-
Junyu Lai authored
* changes: Address comments on aosp/1550755 [VCN07.1] Add test for bypassing VCN for non-internet request
-
junyulai authored
Test: TH Bug: 179554972 Change-Id: If82d561231b74e8cd0d220431ac83d08e8f16cdd
-
junyulai authored
This CL bypass adding NOT_VCN_MANAGED on R device. And add TODOs for refactoring and adding test coverage. Test: atest CtsNetTestCasesLatestSdk:NetworkRequestTest on R device Bug: 175662146 Change-Id: Id09b19c13f9a74e25d45689d2211418172dfaec8
-
- Feb 07, 2021
-
-
Sudheer Shanka authored
This would allow us to run both metered and unmetered networkpolicy related tests when the device is on a cellular network. Bug: 165343126 Test: atest CtsHostsideNetworkTests:HostsideRestrictBackgroundNetworkTests Test: atest CtsHostsideNetworkTests:HostsideNetworkCallbackTests Change-Id: Id70856dffc920e74bda28583dba4dd851a832397 Merged-In: Id70856dffc920e74bda28583dba4dd851a832397
-
- Feb 05, 2021
-
-
Martin Stjernholm authored
This reverts commit f6a1052f. Reason for revert: Suspected reason for TetheringTests breakage Bug: 179467044 Change-Id: I3a5ee621b32145b74a31d6c3e411bd789e395935
-
junyulai authored
Test: atest NetworkRequestTest#testBypassingVcnForNonInternetRequest Bug: 175662146 Change-Id: I245bd69e02866d3608ab1667b665f6e12860037b
-
- Feb 02, 2021
-
-
Tomasz Wasilczyk authored
Bug: 175430552 Test: disable WiFi feature on device with wlan0 Change-Id: I83012013ff6a276d9a5c70748b726289b007cb0a
-
Lucas Lin authored
-
- Jan 29, 2021
- Jan 28, 2021
-
-
Maciej Żenczykowski authored
Test: atest, TreeHugger Signed-off-by:
Maciej Żenczykowski <maze@google.com> Change-Id: I88f14938c7c4f66190a3afa2acd9104284e27927
-
- Jan 27, 2021
-
-
lucaslin authored
Add NetdStaticLibTestsLib into Tethering MTS , so that the tests under client-libs can also be run when running tethering MTS. Bug: 170598012 Test: atest TetheringCoverageTests Change-Id: Idd47becaa4254ab80b74ad5f3ddcdd4b017a5e69
-
Treehugger Robot authored
-
Treehugger Robot authored
-
Remi NGUYEN VAN authored
-
Maciej Żenczykowski authored
Test: atest TetheringTests TetheringCoverageTests Signed-off-by:
Maciej Żenczykowski <maze@google.com> Change-Id: Ibdbba9ef6652dd11bb18eba316045dff440fcf9e
-
Lorenzo Colitti authored
Add code to BpfCoordinator to dump upstream IPv4 and IPv6 rules. For IPv4, currently only the upstream map is printed, because the downstream map is expected to be symmetrical. Example output: ============= 21(21) -> 12(rmnet_data2) 86dd 00:00:00:00:00:00 00:00:00:00:00:00 [wlan1]: iif(iface) oif(iface) v6addr srcmac dstmac 12(rmnet_data2) 21(wlan1) /2001:240:2425:b5dc:21a9:995d:bc57:bc37 b2:b5:e0:24:21:c2 ca:06:8d:54:99:ad [IPv4]: iif(iface) oif(iface) src nat dst 21(21) 12(rmnet_data2) 192.168.16.247:41544 -> 100.101.80.108:41544 -> 216.239.36.135:443 21(21) 12(rmnet_data2) 192.168.16.247:42028 -> 100.101.80.108:42028 -> 8.8.4.4:853 21(21) 12(rmnet_data2) 192.168.16.247:42032 -> 100.101.80.108:42032 -> 8.8.4.4:853 21(21) 12(rmnet_data2) 192.168.16.247:42042 -> 100.101.80.108:42042 -> 8.8.4.4:853 21(21) 12(rmnet_data2) 192.168.16.247:41816 -> 100.101.80.108:41816 -> 8.8.8.8:853 21(21) 12(rmnet_data2) 192.168.16.247:42040 -> 100.101.80.108:42040 -> 8.8.4.4:853 ============= Also make it possible to do "dumpsys tethering bpf" and get only the BPF dump. Test: manual Change-Id: I2aaa2fdda7d724994090c26feff585f24cd3283b
-
Lorenzo Colitti authored
* changes: Remove IpServer.Dependencies#getIfIndex. Address comments on aosp/1559686.
-
Maciej Żenczykowski authored
Test: N/A Signed-off-by:
Maciej Żenczykowski <maze@google.com> Change-Id: Ic217e08484c39077bcc408195daa3311ed93ad28
-
- Jan 26, 2021
-
-
Lorenzo Colitti authored
This code is unused. Test: atest TetheringTests Change-Id: Iaac422d72e8538b67798cb3ae3737deb7b426401
-
Lorenzo Colitti authored
Also remove some unnecessary line wrapping. Test: atest TetheringTests Change-Id: Ia7638b3198d7811cdbb34e959c50608cf1a656bf
-
Lorenzo Colitti authored
Test: new unit test Change-Id: Ibec09f328e24111aee4760af2f75ea5a80ba84c3
-
Lorenzo Colitti authored
Test: test-only change Change-Id: I9a47234979cbb161dfcd0c97c54c0476aa753c5e
-
Lorenzo Colitti authored
- Add methods to start and stop IPv6 forwarding upstream - Populate the upstream IPv6 map when the first rule for any upstream/downstream pair is created. - Clear the upstream IPv6 map when the last rule for any upstream/downstream pair is deleted. Test: Added coverage to IpServerTest and BpfCoordinatorTest Change-Id: Ib041081e95f5f449489ab63138de034222ffac8f
-
Lorenzo Colitti authored
The two value types are identical so there is no need to have separate classes for them. Test: atest TetheringTests Change-Id: Ia622b082d0a44373d21f51222f5e675e5bde08e0
-