Skip to content
Snippets Groups Projects
  1. Feb 01, 2022
    • Remi NGUYEN VAN's avatar
      Reorganize connectivity framework dependencies · 6a20eeda
      Remi NGUYEN VAN authored
      Allow framework-connectivity to depend on framework-connectivity-t
      stubs, and framework-connectivity-t to depend on prebuilt (to avoid
      circular dependencies) framework-connectivity stubs to compile its own
      stubs, and framework-connectivity.impl to compile its implementation.
      
      Also reorganize jarjar rules so that service and framework jar can use
      static libraries in framework-connectivity without packaging their own,
      reducing duplicate code.
      
      Bug: 204830222
      Test: m
      Change-Id: I75c34986e7c479de23cdb2e9b360fa1fede018c9
      6a20eeda
    • Remi NGUYEN VAN's avatar
      Link empty nearby library into tethering apex · a2f7b186
      Remi NGUYEN VAN authored
      Nearby will be merged together with the tethering/connectivity APEX, so
      that module maintenance efforts can be reduced, and the two codebases
      can evolve the interfaces that they expose to each other over time.
      
      This is a cherry-pick from downstream branches, with some differences:
       - nearby/Android.bp is added with empty libraries
       - There is no API change, as no API classes are added
       - proguard is not applied, so no proguard rules change
       - HalfSheetUX APK is not added to the APEX
      
      Bug: 189355156
      Test: m
      Merged-In: If4b40689a257d2806f895cd2dded97fc699adc5f
      Change-Id: I2eb965a0965ffce08388278945160e57e8094339
      a2f7b186
    • Maciej Żenczykowski's avatar
      Merge changes Ifd6be50a,I857e40c9,I1b9f4fde,Ib3b43cf2 · 76709a18
      Maciej Żenczykowski authored
      * changes:
        Prevent native_init from starting TrafficController
        Remove libutils dependency from libservice-connectivity
        Merge libtraffic_controller_jni into libservice-connectivity
        [NETD-TC#15] Make ConnectivityService and PermissionMonitor calls BpfNetMaps on T
      76709a18
    • Jean Chalard's avatar
      Merge changes Id5e5b911,I8301abad,I7262811a,I658e579b,I7d43ef0e · 4fcb8ad2
      Jean Chalard authored
      * changes:
        Expose access UIDs.
        Send access UIDs to netd
        Add accessUids to NetworkCapabilities.
        Clean up restrictions on network agent capabilities
        Sanitize NetworkCapabilities from agent on the handler thread
      4fcb8ad2
  2. Jan 31, 2022
    • Ken Chen's avatar
      523eaffc
    • Patrick Rohr's avatar
      Prevent native_init from starting TrafficController · c2984fdc
      Patrick Rohr authored
      TrafficController is currently still started by netd, and this should
      not happen in two places. Instead, native_init should init (open) the
      maps.
      
      Test: atest FrameworksNetTests
      Change-Id: Ifd6be50aa5f62e59a5b1c5c0a97550389fd0e7e1
      c2984fdc
    • Patrick Rohr's avatar
      Remove libutils dependency from libservice-connectivity · 313bc6c2
      Patrick Rohr authored
      Remove libutils dependency.
      
      Test: m
      Change-Id: I857e40c984bcce2931b5068b3b96d2c9dd69693c
      313bc6c2
    • Patrick Rohr's avatar
      Merge libtraffic_controller_jni into libservice-connectivity · 361b859b
      Patrick Rohr authored
      There is not really a point to separate these two as they are all used
      in ConnectivityService.
      As a future TODO, we might want to rename libservice-connectivity to
      libcom_android_server_jni to be more inline with the jarjar'ed jni lib
      versions.
      
      Test: atest FrameworksNetTests:ConnectivityServiceTest
      Change-Id: I1b9f4fde345038bda6b3ffcf8e3f47cf9262e052
      361b859b
    • Lorenzo Colitti's avatar
    • Wayne Ma's avatar
      [NETD-TC#15] Make ConnectivityService and PermissionMonitor · 2fde98c8
      Wayne Ma authored
      calls BpfNetMaps on T
      
      Since TrafficController moves to mainline module for T, so some netd binder
      interfaces revelant to BPF are going to deprecated. Provide JNI APIs to
      call TrafficController inside mainline module for T.
      
      Bug: 209935649
      Test: atest CtsHostsideNetworkTests
      Change-Id: Ib3b43cf2840e02806395af9f1e019ca6fccd032e
      2fde98c8
    • Chalard Jean's avatar
      Expose access UIDs. · 41a602d2
      Chalard Jean authored
      CTS already have basic tests for this since they run the common tests,
      which were using these hidden methods already.
      
      Test: CtsNetTestCases
      Change-Id: Id5e5b911f5c63bdd3b05e5ac1d3dd89c1c525ab7
      41a602d2
    • Chalard Jean's avatar
      Send access UIDs to netd · e6c95275
      Chalard Jean authored
      Test: FrameworkNetTests CtsNetTestCases
      Change-Id: I8301abaddf5850071fa23d41e8e736ab7071e299
      e6c95275
    • Chalard Jean's avatar
      Add accessUids to NetworkCapabilities. · 9a30acf7
      Chalard Jean authored
      For now, all entry points reject this. Followup changes
      will allow the supported use cases.
      
      Test: new unit tests and CTS for this in this patch
      Change-Id: I7262811a2e46336d3bb63c80886fc0578a36da94
      9a30acf7
    • Chalard Jean's avatar
      Clean up restrictions on network agent capabilities · 15228575
      Chalard Jean authored
      This is a no-op change.
      
      Test: FrameworkNetTests
      
      Change-Id: I658e579bf49e1baf57a8aeaabc8d07d7d3293c56
      15228575
    • Chalard Jean's avatar
      Sanitize NetworkCapabilities from agent on the handler thread · 366c525b
      Chalard Jean authored
      NetworkAgents send NetworkCapabilities to ConnectivityService but
      there are limits to what exactly they can send. Going forward,
      some of these checks will have to happen on the handler thread,
      which is already the case when an agent updates its capabilities,
      but not upon registration.
      
      This patches moves the sanitization on the handler thread, after
      the network monitor is created for a network agent.
      
      Before this patch, upon registration of a new agent, the binder
      thread would copy and sanitize the capabilities, then store them
      in nai.networkCapabilities. It would store the original caps from
      the agent in the NAI, mix in what is known from the network info,
      process the LinkProperties, and then proceed to create the
      network monitor, but not yet store the NAI in the internal
      structures because its registration is not finalized, so other
      methods should not see it yet. After the monitor is created in
      the network stack process, the NAI is stored in the internal
      structures which publishes it for all methods to see. After
      that is done, the NAI calls to the network monitor to warn it
      that it's registered, what its capabilities are, and that it's
      time to start validation if applicable.
      
      With this patch, the validation no longer happens on the binder
      thread. Instead, the binder thread stores the capabilities and
      link properties as is, before sanitization, in the NAI. This is
      fine because no other method can access these until the
      registration completes upon notification that the monitor has
      been created ; this agent is only stored in the network monitor
      callbacks in a self-destructing object precisely to make sure
      that's the case.
      When the monitor is created and CS receives notification of the
      same, it will sanitize the capabilities before adding the NAI
      to the internal structures, to protect the invariant that the
      un-sanitized capabilities inside the NAI can't ever be seen by
      any other method. After that's done, it will call to the
      monitor to start validation as usual.
      
      Test: FrameworksNetTests CtsNetTestsCases
      Change-Id: I7d43ef0e25955e0349903b4801b9dfd8c3c92586
      366c525b
  3. Jan 30, 2022
    • Sooraj Sasindran's avatar
      Allow Carrier app to request for CBS capability · e9cd2084
      Sooraj Sasindran authored
      Test: unit test and CTS
      Bug: 194332512
      Change-Id: I29680b56d790106ad082f1a398c2bddb030f834a
      e9cd2084
    • Ken Chen's avatar
      [NETD-BPF#19] Mainline part of bpf code from netd · 1647f60d
      Ken Chen authored
      1. Add libnetd_updatable.so in com.android.tethering. The library is
      loaded by netd. Currently, it mainly targets on a few functions which
      access BPF maps. The functionality may extend in the future.
      
      2. Attach gcroup progs from libnetd_updatable.so.
      
      3. Move (privileged)TagSocket and untagSocket implementation to mainline
      module. Combine privilegedTagSocket and untagSocket into a single
      function.
      
      4. Split related unit tests from netd_unit_test to
      libnetd_updatable_unit_test as well.
      
      Bug: 202086915
      Test: cd system/netd; atest
      Test: atest TrafficStatsTest NetworkUsageStatsTest
      
      Change-Id: Ib556458103a4cbb643c1342d9b689ac692160de0
      1647f60d
  4. Jan 29, 2022
  5. Jan 28, 2022
  6. Jan 27, 2022
Loading