1. 23 Mar, 2016 1 commit
  2. 22 Mar, 2016 5 commits
    • Lorenzo Colitti's avatar
      Merge changes I149ccda5,I4457abd4,I67bff7c3,Ie15b0775,I8dd9fc60 into nyc-dev · 7fa41f33
      Lorenzo Colitti authored
      * changes:
        Stop using SIOCKILLADDR in netd.
        Add a rudimentary unit test for BandwidthController.
        Slightly restructure the data saver iptables rules.
        Remove the ability to enable/disable the happy box.
        Don't keep naughty/nice app state in BandwidthController.
      7fa41f33
    • Lorenzo Colitti's avatar
      Stop using SIOCKILLADDR in netd. · 29ca4e04
      Lorenzo Colitti authored
      SOCK_DESTROY is now supported in all N device kernels.
      
      Bug: 26976388
      Change-Id: I149ccda56edacac28602daddb01b5fd0222d5fb0
      29ca4e04
    • Lorenzo Colitti's avatar
      Add a rudimentary unit test for BandwidthController. · 86a47982
      Lorenzo Colitti authored
      Bug: 26685616
      Bug: 27506285
      Change-Id: I4457abd43697a0425f167b81c1432d743800abb8
      86a47982
    • Lorenzo Colitti's avatar
      Slightly restructure the data saver iptables rules. · 7618ccb3
      Lorenzo Colitti authored
      1. Make bw_costly_shared jump to bw_happy_box after
         bw_penalty_box. This allows the framework to manipulate
         whitelists and blacklists independently.
      2. Make bw_happy box always whitelist system apps. Because
         bw_penalty_box is consulted before bw_happy_box, the
         framework can always blacklist certain system apps (e.g.,
         the media server) by putting them in the blacklist.
      3. Add a method to add/remove a reject at the end of
         bw_costly_shared. This will allow the framework to
         enable/disable data saver by changing only one rule.
      
      Bug: 26685616
      Bug: 27506285
      Change-Id: I67bff7c3c9ff5eb3f84fb84550cdf49f153e1b68
      7618ccb3
    • Erik Kline's avatar
      Add initial dump() method to NetdNativeService · 2d3a1634
      Erik Kline authored
      This is called by "dumpsys netd".
      
      Bug: 27239233
      Change-Id: I27fb308f8067243ff241a6f8fd6a83f406087d2a
      2d3a1634
  3. 21 Mar, 2016 1 commit
  4. 18 Mar, 2016 2 commits
  5. 17 Mar, 2016 1 commit
    • Lorenzo Colitti's avatar
      Start NetdNativeService before CommandListener. · e4851ded
      Lorenzo Colitti authored
      Starting CommandListener tells NetworkManagementService that netd
      is ready to accept commands. Ensure that the binder service is
      started (i.e., we have called startThreadPool) before we do this.
      
      Bug: 27239233
      Change-Id: Ica89e72f51eb4752cb5cea2e4096c6a9dc5776d7
      e4851ded
  6. 14 Mar, 2016 2 commits
  7. 09 Mar, 2016 1 commit
  8. 02 Mar, 2016 5 commits
  9. 01 Mar, 2016 1 commit
  10. 26 Feb, 2016 1 commit
  11. 25 Feb, 2016 3 commits
  12. 23 Feb, 2016 2 commits
    • Lorenzo Colitti's avatar
      Rename the netd service from "android.net.INetd" to "netd". · c2c7b755
      Lorenzo Colitti authored
      Bug: 27239233
      Change-Id: I34a5554604e6d8b8a50838c6911c28503cbf4540
      c2c7b755
    • Lorenzo Colitti's avatar
      Initial netd binder interface. · e4d626ea
      Lorenzo Colitti authored
      In this change:
      
      1. AIDL files for a new, android.net.INetd service, and
         corresponding implementation using generated code. For now the
         interface is just a prototype: it only has one trivial method.
      2. Permission checking code to check for CONNECTIVITY_INTERNAL.
      3. Add a Big Netd Lock and provide a wrapper that makes it easy
         to ensure that it is taken by every CommandListener command.
      
      Bug: 27239233
      Change-Id: I448d0ac233edd0e351a7fe7f13901fb6871683a2
      e4d626ea
  13. 18 Feb, 2016 1 commit
  14. 17 Feb, 2016 2 commits
  15. 16 Feb, 2016 2 commits
    • Erik Kline's avatar
      Switch to ifc_add_address() for setcfg · d7761bf0
      Erik Kline authored
      am: 397fbc05
      
      * commit '397fbc05':
        Switch to ifc_add_address() for setcfg
      d7761bf0
    • Erik Kline's avatar
      Switch to ifc_add_address() for setcfg · 5e69c7f6
      Erik Kline authored
      This avoids the issue where, for example, 10.0.0.1/8 is added first,
      then 10.0.0.1/8 is deleted, and 10.0.0.1/24 is added.  Netlink changes
      observed at the wrong time would make it seem as though IPv4 had
      been lost when in fact everthing was fine.
      
      Bug: 26991160
      
      (cherry picked from commit 397fbc05)
      
      Change-Id: Ia5a5fcdd01e0950ac099c2054d74f0c52aa20b9c
      5e69c7f6
  16. 15 Feb, 2016 1 commit
    • Lorenzo Colitti's avatar
      Support killing sockets using SOCK_DESTROY. · 8464e1ed
      Lorenzo Colitti authored
      This gives netd the ability to close sockets on a particular
      source IP address using SOCK_DESTROY. It does not yet enable
      this behaviour.
      
      The microbenchmark is able to close 500 IPv6 sockets in ~30ms on
      my angler. Specifically:
      
      - Scanning 500 socketpairs: ~5ms
      - Scanning 500 socketpairs and killing one half of each: ~30ms
      - Scanning 500 socketpairs and killing both halves of each: ~40ms
      
      This is about ~2.5x-3.5x slower than SIOCKILLADDR:
       - For 500 sockets, it's 9.5ms vs. 22.9ms.
       - For 4000 sockets, it's ~40ms vs ~135ms.
      
      A large part of that is due to sending RST packets, which
      SIOCKILLADDR does not do. If the kernel is modified so that
      SOCK_DESTROY does not send RSTs, the time taken to kill 4000
      sockets goes down to ~70ms
      
      Batching the destroy operations does not help much. It saves
      5-10%, but it complicates error handling.
      
      Bug: 26976388
      Change-Id: I2e1ac30af5dbcdb98dbb7c6e4d4d67c55b9fd00f
      8464e1ed
  17. 11 Feb, 2016 1 commit
    • Felipe Leme's avatar
      Created a firewall chain for power save mode. · 3f624341
      Felipe Leme authored
      When power-save mode was first implemented, there were no firewall rules
      on netd, so the solution was to make all network interface metered and
      re-use the bw_penalty_box chain.
      
      This change removes that workaround by creating a explicit fw_powersave
      chain, whose behavior is similar to fw_dozable (in fact, it reuses some
      of its code); such change not only makes network restrictions on
      power-save mode simpler, but it also allows to optimze how the restrict
      network rules are changed.
      
      BUG: 27127112
      Change-Id: I52aee49d80386594e3a52fea9667d580d2d944a1
      3f624341
  18. 10 Feb, 2016 1 commit
    • Erik Kline's avatar
      Switch to ifc_add_address() for setcfg · 397fbc05
      Erik Kline authored
      This avoids the issue where, for example, 10.0.0.1/8 is added first,
      then 10.0.0.1/8 is deleted, and 10.0.0.1/24 is added.  Netlink changes
      observed at the wrong time would make it seem as though IPv4 had
      been lost when in fact everthing was fine.
      
      Bug: 26991160
      Change-Id: If0dad2993f818686ef8a99618e779813e9c7af90
      397fbc05
  19. 05 Jan, 2016 2 commits
  20. 24 Dec, 2015 1 commit
  21. 17 Dec, 2015 1 commit
  22. 05 Dec, 2015 1 commit
  23. 04 Dec, 2015 2 commits