Commit Graph

3912 Commits

Author SHA1 Message Date
Hugo Benichi
89ea107828 Merge "Merge "NetworkStatsFactory: fix double accounting on IPv6 only networks" am: 60c8870d97 am: 76dc14ec88 am: 1697d48faf" into oc-dev-plus-aosp
am: f8dbdba5a2

Change-Id: Ie09f2b4e04749e61923781f4b13e796054108fad
2017-05-10 02:06:06 +00:00
Android Build Merger (Role)
a1b1749c82 Merge "Merge "NetworkStatsFactory: fix double accounting on IPv6 only networks" am: 60c8870d97 am: 76dc14ec88 am: 1697d48faf" into oc-dev-plus-aosp 2017-05-10 00:47:39 +00:00
Hugo Benichi
97bf308ff6 Merge "NetworkStatsFactory: fix double accounting on IPv6 only networks" am: 60c8870d97 am: 76dc14ec88
am: 1697d48faf

Change-Id: I8b0cf31ef356aae9992f893ca35001d048999519
2017-05-10 00:44:51 +00:00
Hugo Benichi
d66a25ab97 Merge "NetworkStatsFactory: fix double accounting on IPv6 only networks" am: 60c8870d97 am: 76dc14ec88
am: 1697d48faf

Change-Id: I7dbfe3c96678e2325eb533f31523ad10d861ad02
2017-05-10 00:40:28 +00:00
Hugo Benichi
c34549c34c NetworkStatsFactory: fix double accounting on IPv6 only networks
For 464xlat scenarios on IPv6 networks, the clatd interface setup
introduces double counting of apps ipv4 traffic. NetworkStatsFactory was
accounting for this on the tx path, but not on the rx path. Also it did
not accounted for the 20 bytes added by the IPv6 header.

This patch subtract correctly the rx and tx traffic from the root uid on
the underlying interface, and also adds correctly the 20 bytes cost per
packet on the stacked interface for 464xlat traffic.

Test: added several new unit tests, based on synthetic data and real
      data also.
Bug: 33681750
Change-Id: I4867fe181938d94b5594b3d88896a3c4e01d895c
Merged-In: I2675643b220acbc6110179fa937d4c313b6f5e32

(cherry picked from commit e1bb3a14d1ee1aba2f92e5bccf659774699eaffe)
2017-05-10 09:19:12 +09:00
Hugo Benichi
60c8870d97 Merge "NetworkStatsFactory: fix double accounting on IPv6 only networks" 2017-05-10 00:07:29 +00:00
Hugo Benichi
a884d4fc21 NetworkStatsFactory: fix double accounting on IPv6 only networks
For 464xlat scenarios on IPv6 networks, the clatd interface setup
introduces double counting of apps ipv4 traffic. NetworkStatsFactory was
accounting for this on the tx path, but not on the rx path. Also it did
not accounted for the 20 bytes added by the IPv6 header.

This patch subtract correctly the rx and tx traffic from the root uid on
the underlying interface, and also adds correctly the 20 bytes cost per
packet on the stacked interface for 464xlat traffic.

Test: added several new unit tests, based on synthetic data and real
      data also.
Bug: 33681750
Change-Id: I2675643b220acbc6110179fa937d4c313b6f5e32
2017-05-09 22:46:14 +09:00
Android Build Merger (Role)
b94bc1fd6b Merge "Merge "Move some NetworkStats tests to tests/net." into oc-dev am: 74fe2cbc3a -s ours am: c1cb5c3a8c -s ours" 2017-05-09 06:49:26 +00:00
Lorenzo Colitti
29b9aa2eb8 Merge "Move some NetworkStats tests to tests/net." into oc-dev am: 74fe2cbc3a -s ours
am: c1cb5c3a8c  -s ours

Change-Id: I40b5bb1e640358e6889f92dacdd2a977bc9758fb
2017-05-09 06:46:48 +00:00
Lorenzo Colitti
c1cb5c3a8c Merge "Move some NetworkStats tests to tests/net." into oc-dev
am: 74fe2cbc3a  -s ours

Change-Id: I4c58d302385c733108614c681632d3a8bc2dbdcf
2017-05-09 06:40:41 +00:00
Hugo Benichi
9a5cc37c6f Merge changes I4872f8ba,I92039f29,Iaad13e13 am: 767ac317e2 am: 717238a614 am: 44e9b81c54
am: ce04f07399

Change-Id: Ia0f85518fd0e75e768fa037c5d0bcf062b3c1f93
2017-05-09 06:39:13 +00:00
Hugo Benichi
ce04f07399 Merge changes I4872f8ba,I92039f29,Iaad13e13 am: 767ac317e2 am: 717238a614
am: 44e9b81c54

Change-Id: I9c38d1254f82b50f4d1e953e72bf15a46562d3b8
2017-05-09 06:30:48 +00:00
Hugo Benichi
0a118cefb8 NsdService: test coverage for client requests.
Adding coverage for:
  - NsdManager client disconnection
  - in-flight request GC

Test: new test passes
Bug: 37013369, 33298084
Change-Id: I92039f297cf99352bbf4196797933d89c0b819ff
2017-05-09 10:49:33 +09:00
Lorenzo Colitti
f7ffa460e4 Move some NetworkStats tests to tests/net.
This groups them together with the rest of the networking unit
tests. It also speeds up compile/test cycles ("runtest -x" of one
file goes from 1m15s to 30s).

Bug: 33681750
Test: runtest frameworks-net passes on internal tree
Merged-In: I53cb0c51355fe4b4b30e451fa09fbbf58da39efd
Change-Id: I5ae5dbf74c94feb0fe3759681e5e6d6fba62fa32

(cherry picked from commit c86013be936f36c61fa0cdfad95141f6de3c6ef7)
2017-05-08 08:38:08 +00:00
Hugo Benichi
959fb59018 Merge "NsdManager: add test coverage for discoverServices()" am: 3e21b1745c am: 60182dbe4e am: 27b0eebb4d
am: f828e46f2d

Change-Id: I2bbd97293d2887824b857d7e20fdc14d574bc097
2017-05-02 09:09:55 +00:00
Hugo Benichi
f828e46f2d Merge "NsdManager: add test coverage for discoverServices()" am: 3e21b1745c am: 60182dbe4e
am: 27b0eebb4d

Change-Id: I46acfd104ac3457126c3ccef5041788e4146321c
2017-05-02 09:04:59 +00:00
Hugo Benichi
1f19af6a15 Merge "NsdManager: unit test coverage for servive registration" am: b0e408450c am: bc57faa1ac am: 9a3e69d9b6
am: 31b86a0a68

Change-Id: I88461d537e43fb086366dcc681b5ef2c2bdcdc2f
2017-05-02 06:56:15 +00:00
Hugo Benichi
31b86a0a68 Merge "NsdManager: unit test coverage for servive registration" am: b0e408450c am: bc57faa1ac
am: 9a3e69d9b6

Change-Id: Ideabb1c929ddd4307e66831cddb20e2feac2c6d9
2017-05-02 06:49:52 +00:00
Hugo Benichi
3382f9fe27 NsdManager: add test coverage for discoverServices()
Test: added new tests
Bug: 37013369, 33298084
Change-Id: If6c1113ee1bd4690db90abd5a61c3e229c827aec
2017-05-02 15:26:33 +09:00
Lorenzo Colitti
27f6393faf Merge "Add a method to start the captive portal login app." into oc-dev am: 5555b1e3d1
am: d388cbb9e4

Change-Id: I65e9632d28e63ba3278a5f396554b7be302e20d1
2017-05-02 04:51:08 +00:00
Lorenzo Colitti
d388cbb9e4 Merge "Add a method to start the captive portal login app." into oc-dev
am: 5555b1e3d1

Change-Id: Ic7c14bd3dfd07f97c04901f043ed1cd3b1eee6e4
2017-05-02 04:44:31 +00:00
Hugo Benichi
f04537fd28 NsdManager: unit test coverage for servive registration
This patch adds test coverage for NsdManager#registerService() and
NsdManager#unregisterService(). This test shows a potential defect in
the api: if unregisterService() fails, the associated listener is always
unregistered from NsdManager. If the service initially registered is
still registered, this potentially make it impossible to unregister.

Test: added new unit test
Bug: 37013369, 33298084
Change-Id: Ia089b6d2f2a349907a8b29d9a3acd7f59e177887
2017-05-02 13:31:24 +09:00
Lorenzo Colitti
500dbae1b5 Add a method to start the captive portal login app.
Bug: 36203355
Bug: 36656914
Test: ConnectivityServiceTest (including new test) passes
Change-Id: I82a9a9a8da47870ba3f1bbef5941b37e970c844f
2017-05-01 16:01:15 +09:00
Lorenzo Colitti
57ec8b82b6 Merge "Address ConnectivityManager API comments." into oc-dev am: 2121eeec48
am: a75dc7e122

Change-Id: I8f7ec6d4a2ee8c74e015fdff0ef83fe4218b4efd
2017-04-28 04:11:54 +00:00
Lorenzo Colitti
a75dc7e122 Merge "Address ConnectivityManager API comments." into oc-dev
am: 2121eeec48

Change-Id: I7024b4fe23ab12760fb452a59929df886912b104
2017-04-28 04:04:21 +00:00
Lorenzo Colitti
2121eeec48 Merge "Address ConnectivityManager API comments." into oc-dev 2017-04-28 03:58:16 +00:00
Lorenzo Colitti
139a48c83c Address ConnectivityManager API comments.
Bug: 36370941
Test: marlin builds and boots
Change-Id: I693ee5270bf186c88c7c5056293519f7237504ff
2017-04-28 00:58:00 +09:00
Hugo Benichi
47646a9fc1 Merge "NsdManager: unit tests for argument validation" am: 3cff7deecb am: d97e358f7a am: 48947de481
am: eebf240d12

Change-Id: I4c4251257c7ddcff82460dd71ff62adecd900420
2017-04-27 13:16:11 +00:00
Hugo Benichi
95c736783d Merge "NsdService: disentangle NativeDaemonConnector from ctor" am: fa97f11b20 am: 47748b754c am: 5d0bd13538
am: 2018a29a88

Change-Id: Ie0a42ede086cc480830c91e770eaf250bcd2f711
2017-04-27 13:14:10 +00:00
Hugo Benichi
eebf240d12 Merge "NsdManager: unit tests for argument validation" am: 3cff7deecb am: d97e358f7a
am: 48947de481

Change-Id: I8a51ff51071adc60fe9f4d99ec629edabbed353d
2017-04-27 13:09:02 +00:00
Hugo Benichi
2018a29a88 Merge "NsdService: disentangle NativeDaemonConnector from ctor" am: fa97f11b20 am: 47748b754c
am: 5d0bd13538

Change-Id: Ic8ddf92c7c64d4214a75bea6d6e5083f4612a76a
2017-04-27 13:06:59 +00:00
Hugo Benichi
bad1bfedcd NsdManager: unit tests for argument validation
Test: new tests pass.
Bug: 37013369, 33298084
Change-Id: Ia514d2bbd967d46fed54e379f319b572ade22c62
2017-04-27 16:35:48 +09:00
Hugo Benichi
59ade871f8 NsdService: disentangle NativeDaemonConnector from ctor
This patch disentangles the creation of NativeDaemonConnector from the
creation of NsdService by introducing a wrapper type DaemonConnection.

This allows to mock this dependency in unit tests.

Test: enhanced previously introduced new tests.
Bug: 37013369, 33298084
Change-Id: I894b7cddfc509f86d0134d214c88c063b81b5e0a
2017-04-27 16:35:30 +09:00
Hugo Benichi
6ea5a594f4 Merge "NsdService: bootstrap unit tests" am: 0f0ab71fb1 am: dd53c962b2 am: d29ce6ae8c
am: a5cd2bc5eb

Change-Id: I018d6fbface4a9d4a568486dedd30d05e0ddd949
2017-04-27 06:01:38 +00:00
Hugo Benichi
a5cd2bc5eb Merge "NsdService: bootstrap unit tests" am: 0f0ab71fb1 am: dd53c962b2
am: d29ce6ae8c

Change-Id: Iaf0679790e934baaaf48bcb04098aa18deca4d60
2017-04-27 05:49:47 +00:00
Hugo Benichi
0f0ab71fb1 Merge "NsdService: bootstrap unit tests" 2017-04-27 05:22:54 +00:00
Erik Kline
6b6e74b571 Merge "Clarify some IpManager/ApfFilter debugging output." into oc-dev am: 40ccb1b5aa
am: fecbdc5ce1

Change-Id: Iec4ab9cadefb9de773e73a124d40ac5f69b8136d
2017-04-27 04:08:10 +00:00
Erik Kline
fecbdc5ce1 Merge "Clarify some IpManager/ApfFilter debugging output." into oc-dev
am: 40ccb1b5aa

Change-Id: Ie883f62bdc731c8da3b3d5ac1df827e1fd5b44be
2017-04-27 03:58:12 +00:00
Erik Kline
b576b322b3 Merge "Clarify some IpManager/ApfFilter debugging output." am: ce94c07ffd am: 3cc7ccfc69 am: b1914ebb50
am: a069fc8481

Change-Id: I7ff76ff8602477586d2fd315c730203f28744027
2017-04-27 00:46:41 +00:00
Erik Kline
a069fc8481 Merge "Clarify some IpManager/ApfFilter debugging output." am: ce94c07ffd am: 3cc7ccfc69
am: b1914ebb50

Change-Id: If64f2b8a5cdf8b946a82a0c97a42cf61ef5e0b08
2017-04-27 00:35:25 +00:00
Erik Kline
6a14375cc2 Clarify some IpManager/ApfFilter debugging output.
Test: as follows
    - built
    - flashed
    - booted
    - "runtest frameworks-net" passes
    - "adb shell dumpsys wifi ipmanager" shows updated output
Bug: 34793131
Change-Id: I6dec135b97343943efb421ef7b2e84c4751dd5ea
(cherry picked from commit af579eb5b516296a8ec0b02d824f2ba646e60ca2)
2017-04-26 17:17:04 +09:00
Erik Kline
aca4fac0db Clarify some IpManager/ApfFilter debugging output.
Test: as follows
    - built
    - flashed
    - booted
    - "runtest frameworks-net" passes
    - "adb shell dumpsys wifi ipmanager" shows updated output
Bug: 34793131
Change-Id: I6dec135b97343943efb421ef7b2e84c4751dd5ea
2017-04-26 17:14:47 +09:00
Etan Cohen
2dec0a707c Merge "[AWARE] Add UID checking to WifiAwareNetworkSpecifier" am: 7b6ba2b3ea am: 3c6305cc55 am: 887fd90742
am: e6d346bc06

Change-Id: I4ef57924507633315ed0dbd5f18abbd9138de572
2017-04-25 13:46:42 +00:00
Etan Cohen
e6d346bc06 Merge "[AWARE] Add UID checking to WifiAwareNetworkSpecifier" am: 7b6ba2b3ea am: 3c6305cc55
am: 887fd90742

Change-Id: I8480ac43d89dc85b541e6255c3cdc597393896cf
2017-04-25 13:40:42 +00:00
Etan Cohen
7b6ba2b3ea Merge "[AWARE] Add UID checking to WifiAwareNetworkSpecifier" 2017-04-25 13:21:36 +00:00
Hugo Benichi
4aea3e884a Merge "NetworkCapabilities: remove duplicated TRANSPORT_NAMES" into oc-dev-plus-aosp
am: c3d2f25a5d

Change-Id: I1e039236d7d4eda6354c81440fbbc43346376f23
2017-04-25 08:09:32 +00:00
Hugo Benichi
8e8532c8f3 NetworkCapabilities: remove duplicated TRANSPORT_NAMES
Due to multi-branch automerging issue, TRANSPORT_NAMES got inserted
twice into NetworkCapabilities both by commits 45670bb37d and
21665ac809. This patch deletes one of the copy.

Test: no functionality change. Build is fixed.
Change-Id: I2adec1a9cb1ee6f1d61dfeec2d0b92b8141eed88
2017-04-25 16:31:06 +09:00
Hugo Benichi
91c45e4dbb NsdService: bootstrap unit tests
Test: new tests part of $ runtest frameworks-net
Bug: 37013369, 33298084
Change-Id: Ief45f838268380b4b2a128390fbf34d55a3b922b
2017-04-25 10:42:58 +09:00
Jeff Sharkey
7a13941935 Merge "Even more auto-doc work." into oc-dev am: 880f4f4cc2
am: 1ee1487e29

Change-Id: I96c77c62b6ee3b5acaa45e116d35c7114797a0b8
2017-04-24 22:43:34 +00:00
Jeff Sharkey
1ee1487e29 Merge "Even more auto-doc work." into oc-dev
am: 880f4f4cc2

Change-Id: I78199f8366fbda65a4b4917675291d946e29285c
2017-04-24 21:38:03 +00:00