Skip to content
Snippets Groups Projects
  1. Feb 12, 2021
  2. Feb 10, 2021
    • Sudheer Shanka's avatar
      Update the way we change meteredness of cellular networks in tests. · 37c10a22
      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
      37c10a22
    • Lorenzo Colitti's avatar
      Merge changes from topics "vpnmove-getconnectionowneruid",... · 43b96c71
      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.
      43b96c71
    • Lorenzo Colitti's avatar
      Accept both pre-S and post-S errors in getConnectionOwnerUid. · 98d23e7d
      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
      98d23e7d
    • Lorenzo Colitti's avatar
      Add CTS coverage for VpnTransportInfo. · e9aeb3c1
      Lorenzo Colitti authored
      Bug: 173331190
      Test: FrameworksNetTests HostsideVpnTests CtsNetTestCases
      Change-Id: I77d866270c63f1078a2a01941b2271d4338aa178
      e9aeb3c1
    • Lorenzo Colitti's avatar
      Add IPv4 counters. · d561b7f6
      Lorenzo Colitti authored
      Test: dumpsys tethering bpf
      Change-Id: Ie21fee8ad12430ecd21c3903587d25b8dd2a96c4
      d561b7f6
    • Lorenzo Colitti's avatar
      Dump counters in "dumpsys tethering bpf". · 4e92da06
      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
      4e92da06
  3. Feb 09, 2021
    • Lorenzo Colitti's avatar
      Don't leak map fds in BpfCoordinator#dump. · 555472a1
      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
      555472a1
    • Lorenzo Colitti's avatar
      Add test coverage for registerSystemDefaultNetworkCallback. · 1e5cdd31
      Lorenzo Colitti authored
      Bug: 173331190
      Test: atest CtsNetTestCases:NetworkAgentTest
      Change-Id: I3ce51ca253a8bd06408137f6f9ed4056a832cb43
      1e5cdd31
    • Lorenzo Colitti's avatar
      Merge "offload - finish ipv4 tethering" · 4431655a
      Lorenzo Colitti authored
      4431655a
    • Lorenzo Colitti's avatar
      Improve BPF tethering counters. · 72ec3ba8
      Lorenzo Colitti authored
      Test: m
      Change-Id: I53961e1e16bf90d76f16b9416c55b65e8374373d
      72ec3ba8
    • Maciej Żenczykowski's avatar
      Merge changes I3fcd7eb8,I4bf2c762 · d46b3d8e
      Maciej Żenczykowski authored
      * changes:
        Add error counters for various failures.
        Add a bpf_tethering_headers lib used by the programs and JNI.
      d46b3d8e
    • Lorenzo Colitti's avatar
      Add error counters for various failures. · b81584db
      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
      b81584db
    • Lorenzo Colitti's avatar
      Add a bpf_tethering_headers lib used by the programs and JNI. · 734b14e0
      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
      734b14e0
    • Treehugger Robot's avatar
  4. Feb 08, 2021
  5. Feb 07, 2021
    • Sudheer Shanka's avatar
      Update meteredness of cellular networks for tests. · 8247993e
      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
      8247993e
  6. Feb 05, 2021
  7. Feb 02, 2021
  8. Jan 29, 2021
  9. Jan 28, 2021
  10. Jan 27, 2021
  11. Jan 26, 2021
Loading