Commit Graph

6112 Commits

Author SHA1 Message Date
Ian Kasprzak
db10850966 Reland: Add FrameworksNetTests dependency on libcgrouprc
Original CL description:
Add FrameworksNetTests dependency on libcgrouprc

The tests are currently broken without this dependency.

Bug: 132925169
Test: atest FrameworksNetTests
Change-Id: I473b250587d871158e1e9595d56183a0342238d8
Merged-In: If9c8aa41c4e96a79b71c88f199a4f3b0483e31cd
2019-05-17 17:11:16 +09:00
Lorenzo Colitti
2c3f94e392 Merge "Change the icon for the LOGGED_IN notification." 2019-05-17 04:15:51 +00:00
Lorenzo Colitti
b45f7ad98b Change the icon for the LOGGED_IN notification.
This notification is shown when the user has already logged in to
the network, so it should not have a question mark on it.

Bug: 130526201
Test: atest FrameworksNetTests
Test: manually signed in to portal
Change-Id: I8250236bc4ba251492a6cb9bf23e67666ef860d3
2019-05-17 09:00:53 +09:00
Xin Li
8f33552b32 DO NOT MERGE - Merge pie-platform-release (PPRL.190505.001) into master.
Bug: 132622481
Change-Id: I8a3d38c16d3de15514e2418d13d61b57b2cfd907
2019-05-15 16:55:34 -07:00
TreeHugger Robot
a4794fa4c4 Merge "DO NOT MERGE - Merge pi-platform-release (PPRL.190505.001) into stage-aosp-master" into stage-aosp-master 2019-05-15 23:02:14 +00:00
Xin Li
4306eb11f0 DO NOT MERGE - Merge pi-platform-release (PPRL.190505.001) into stage-aosp-master
Bug: 132622481
Change-Id: I7ba1a9999b3a9bac8031dd086fa2632e45404f32
2019-05-15 11:31:45 -07:00
Paul Hu
a582a82795 Merge "Ignore NetworkTest when running CtsNetTestCases in instant app mode"
am: a00c638ebe

Change-Id: I670b9847a2e3b3b794ee4694a0838440cabdc39f
2019-05-14 21:17:33 -07:00
Paul Hu
a00c638ebe Merge "Ignore NetworkTest when running CtsNetTestCases in instant app mode" 2019-05-15 03:42:32 +00:00
Paul Hu
fb8186d0a9 Merge "Fix captive portal app can be launched w/o MAINLINE_NETWORK_STACK permission"
am: c381068caa

Change-Id: I065b5403d2f89d158e76f63c9b125ad30e603633
2019-05-14 04:06:04 -07:00
Paul Hu
c381068caa Merge "Fix captive portal app can be launched w/o MAINLINE_NETWORK_STACK permission" 2019-05-14 10:48:48 +00:00
paulhu
de3a2452a0 Fix captive portal app can be launched w/o MAINLINE_NETWORK_STACK permission
Caller should get SecurityException if called
ConnectivityManager#startCaptivePortalApp() w/o
MAINLINE_NETWORK_STACK permission. But now it will not get any
exception and can launch captive portal app successfully.

Bug: 132662433
Test: atest android.net.cts.ConnectivityManagerTest#testStartCaptivePortalApp
      w and w/o MAINLINE_NETWORK_STACK permission
Test: atest FrameworksNetTests NetworkStackTests

Change-Id: I61be1b0647f4165665a2d4166311adeac956e0d4
2019-05-14 18:44:16 +08:00
Chenbo Feng
6cb0c1579d Merge "Clean up the permission control code in framework"
am: 0e6d2b5f4f

Change-Id: Iff2316f72df4cff56829b281882dc920d63937bd
2019-05-13 11:20:31 -07:00
Treehugger Robot
0e6d2b5f4f Merge "Clean up the permission control code in framework" 2019-05-13 18:04:50 +00:00
Junyu Lai
5fb8a1d525 Merge "Fix concurrent modification exception in KeepaliveTracker"
am: 7da0d7f02e

Change-Id: Ibd23240fdf8fb56b4216e2482152f605374f76db
2019-05-13 03:39:29 -07:00
Junyu Lai
7da0d7f02e Merge "Fix concurrent modification exception in KeepaliveTracker" 2019-05-13 10:09:48 +00:00
junyulai
6e2c653c6e Fix concurrent modification exception in KeepaliveTracker
In aosp/951200, the clean up function delete the item in the
hash map that holds the record while iterating it, where the
list used to iterate the records is backed by the hash map,
so changes to the map are reflected in the list and caused
the concurrent modification exception.

Bug: 132341736
Test: 1. atest com.android.server.ConnectivityServiceTest \
         #testNattSocketKeepalives --generate-new-metrics 300
      2. atest FrameworksNetTests --generate-new-metrics 10

Change-Id: I0481a469ee23231e5f0ab738a06b5e09f6cdb680
2019-05-13 14:48:41 +08:00
Paul Hu
f8f19beda6 Merge "Add ApfCapabilities common test cases"
am: cc8d6dd0bb

Change-Id: Iafcc1bad3e4d5a6bd574231ccf79b0e775617ae2
2019-05-12 10:15:31 -07:00
Paul Hu
cc8d6dd0bb Merge "Add ApfCapabilities common test cases" 2019-05-12 16:57:18 +00:00
Ian Kasprzak
e3dc775c7f [automerger skipped] Merge "Reland: Add FrameworksNetTests dependency on libcgrouprc"
am: 6e0c162246 -s ours
am skip reason: change_id I85891485157ed86e069039dfe3092028ff703dd5 with SHA1 ecbcb7fbfc is in history

Change-Id: Iec27ecd2f0c0636b066fa0fe83c049fff656343f
2019-05-10 13:37:45 -07:00
Ian Kasprzak
6e0c162246 Merge "Reland: Add FrameworksNetTests dependency on libcgrouprc" 2019-05-10 20:08:54 +00:00
Ian Kasprzak
7617ca1b96 Reland: Add FrameworksNetTests dependency on libcgrouprc
Bug: 132435820
Bug: 132437254

Original CL description:
Add FrameworksNetTests dependency on libcgrouprc

The tests are currently broken without this dependency.

Bug: 129902619
Test: atest FrameworksNetTests
Merged-In: I85891485157ed86e069039dfe3092028ff703dd5
Change-Id: I7daf6bdf8a9f8836d17746e1e352f8f75cd34adc
2019-05-10 12:08:44 -07:00
Xiao Ma
82a7e510a5 Merge "Clean up the arguments annotation and verify items on IpMemoryStoreTest."
am: 3bee1cdc4e

Change-Id: Ifbd359f9fec530076f3216c171120436ed4221a6
2019-05-10 08:33:48 -07:00
Xiao Ma
3bee1cdc4e Merge "Clean up the arguments annotation and verify items on IpMemoryStoreTest." 2019-05-10 15:16:33 +00:00
Aaron Huang
c72bc8eea1 Merge "Send message to add/remove NAT-T keepalive packet filter."
am: 29df9e7e8f

Change-Id: I3e35d73a38cfbd0a29ad3f1f859b2d6fdb514ff1
2019-05-10 07:19:27 -07:00
Aaron Huang
29df9e7e8f Merge "Send message to add/remove NAT-T keepalive packet filter." 2019-05-10 13:57:11 +00:00
Chalard Jean
e3950cf24a Merge "Support strict mode private DNS on VPNs that provide Internet."
am: 9db77747a6

Change-Id: I6522706917731a944483ad3cb9cdbc20447be6c2
2019-05-10 03:58:01 -07:00
Chalard Jean
9db77747a6 Merge "Support strict mode private DNS on VPNs that provide Internet." 2019-05-10 09:39:17 +00:00
Paul Hu
5574b26c8e Merge "Add LinkProperties common test cases"
am: 78415c34f4

Change-Id: I8f856d3851458e2a3f32034c9b9e1395123e0f89
2019-05-10 01:18:33 -07:00
Junyu Lai
278e66a401 Merge changes Ibcb91105,I0218f367
am: 6a5c545890

Change-Id: I4972d42657aa118e17240546c223723ed7b546ec
2019-05-10 01:14:05 -07:00
paulhu
73f8eca8ad Add ApfCapabilities common test cases
Bug: 129199900
Test: atest FrameworksNetTests
Test: atest CtsNetTestCases: added tests pass
Change-Id: I0c2aeaa1451e1f07edb0d0f8529e42e6fa107a6d
2019-05-10 16:03:42 +08:00
Xiao Ma
103a7ce029 Clean up the arguments annotation and verify items on IpMemoryStoreTest.
Bug: 131133347
Test: atest FrameworksNetTests
Change-Id: I371e7b637ab1c2671f0378508b06adff174f024d
2019-05-10 15:42:33 +09:00
Paul Hu
78415c34f4 Merge "Add LinkProperties common test cases" 2019-05-10 05:55:11 +00:00
Junyu Lai
6a5c545890 Merge changes Ibcb91105,I0218f367
* changes:
  Limit unprivileged keepalives per uid
  Support customization of supported keepalive count per transport
2019-05-10 05:47:23 +00:00
Lorenzo Colitti
2fca7e3cb3 Support strict mode private DNS on VPNs that provide Internet.
Currently, strict mode private DNS does not work on VPNs because
NetworkMonitor does not validate VPNs. When a VPN connects, it
immediately transitions to ValidatedState, skipping private DNS
hostname resolution.

This change makes NetworkMonitor perform private DNS hostname
resolution and evaluation even on VPNs.

In order to ensure that the system always immediately switches to
the VPN as soon as it connects, remove the unvalidated penalty
for VPN networks. This ensures that the VPN score is always 101
and the VPN always outscores other networks as soon as it
connects. Previously, it would only outscore other networks
when no-op validation completed.

Bug: 122652057
Test: atest FrameworksNetTests NetworkStackTests
Test: manually ran a VPN with private DNS in strict mode
atest android.net.cts.ConnectivityManagerTest com.android.cts.net.HostsideVpnTests
Change-Id: Iaa78a7edcf23755c89d7b354edbc28d37d74d891
2019-05-10 14:30:54 +09:00
Junyu Lai
6c6580aa4f Merge changes Ibff278a6,If6d537a3
am: 5cb924da73

Change-Id: If1d215b0fae85bfeeb5b6190abf4e4dc841912e5
2019-05-09 21:32:10 -07:00
Treehugger Robot
5cb924da73 Merge changes Ibff278a6,If6d537a3
* changes:
  Revert "Add NATT keepalive resources and methods into IpSecService"
  Revert "[KA11] Verify fd ownership and allocate resource for NattKeepalive"
2019-05-10 01:42:26 +00:00
Xin Li
a50f7a2fb3 [automerger skipped] Merge "DO NOT MERGE - Merge Pie Bonito/Sargo into master."
am: b4da895ce0 -s ours
am skip reason: subject contains skip directive

Change-Id: Id9cffb46751533cdd19a71577bf4dddea6219ddb
2019-05-09 16:46:13 -07:00
Xin Li
00a98876ad [automerger skipped] DO NOT MERGE - Merge Pie Bonito/Sargo into master.
am: 82e787f227 -s ours
am skip reason: subject contains skip directive

Change-Id: Ib109cf35cae4b70ac762f9f3d4951968cfa91e9e
2019-05-09 15:56:19 -07:00
Xin Li
b4da895ce0 Merge "DO NOT MERGE - Merge Pie Bonito/Sargo into master." 2019-05-09 22:05:45 +00:00
Junyu Lai
56001c90c8 Merge "Clean up the keepalive slots when network disconnect"
am: 192f09d63e

Change-Id: I2cedf5752d37f96337ab69d94534cb7745e8efa3
2019-05-09 12:29:16 -07:00
Junyu Lai
192f09d63e Merge "Clean up the keepalive slots when network disconnect" 2019-05-09 18:53:03 +00:00
junyulai
782e216494 Clean up the keepalive slots when network disconnect
In general, keepalive slots are released after result of
stopping has returned. However, for network disconnect case,
the service side cannot communicate with network agent since
the async channel is broken.

Clean up keepalive slots right after stop in this case.

Bug: 132341736
Test: 1. atest com.android.server.ConnectivityServiceTest \
         #testNattSocketKeepalives --generate-new-metrics 100
      2. atest FrameworksNetTests --generate-new-metrics 10

Change-Id: Ia30741f71fa72fc117e071976fd73991fa3c9535
2019-05-09 17:16:17 +00:00
Junyu Lai
b4864e6c40 Revert "Add NATT keepalive resources and methods into IpSecService"
This reverts commit bdf7048571.

Reason for revert: Adds dependency between IpSecService and
                   ConnectivityService may lead to future deadlock
		   problems. Uses a simpler approach instead,
		   hence the solution is not needed.
		   See aosp/954040.

Change-Id: Ibff278a6eee666cd85dba81c2bed94d568679b02
2019-05-10 00:58:18 +08:00
junyulai
0586a60292 Limit unprivileged keepalives per uid
Public APIs for creating unprivileged NATT socket keepalive
might allow users to exhaust resource if malicious apps try
to create keepalives with fd which is not created by
IpSecService through binder call. Thus, this change add
customizable limitation per uid to prevent resource exhaustion
attack.

Bug: 129371366
Bug: 132307230
Test: atest FrameworksNetTests
Change-Id: Ibcb91105e46f7e898b8aa7c2babc3344ef2c6257
2019-05-10 00:36:58 +08:00
junyulai
4dca18aa31 Support customization of supported keepalive count per transport
This change specifies the required minimum supported keepalives
in SDK, and allows OEMs to customize supported keepalive count
per network through resource overlay.

Bug: 129371366
Test: 1. m -j doc-comment-check-docs
      2. atest FrameworksNetTests

Change-Id: I0218f3674628c13ead63fc9a873895ba7f113033
2019-05-10 00:36:58 +08:00
Xin Li
82e787f227 DO NOT MERGE - Merge Pie Bonito/Sargo into master.
Bug: 131756210
Change-Id: I77a701deda4935526ad452564f9bda77af345f46
2019-05-09 09:27:04 -07:00
Xiao Ma
042800ead0 Merge "adopt non-blocking method to obtain the IpMemoryStore service."
am: 14b9e8b6d8

Change-Id: Idd6110141795f86dcf28eafab87683eda4c70b93
2019-05-09 04:43:33 -07:00
Xiao Ma
14b9e8b6d8 Merge "adopt non-blocking method to obtain the IpMemoryStore service." 2019-05-09 11:30:56 +00:00
paulhu
9f7636c722 Add LinkProperties common test cases
Bug: 129198747
Test: atest FrameworksNetTests
Test: atest CtsNetTestCases: added tests pass
Change-Id: I15b8dbd060c313d0f2be89fed4518c18b3196d38
2019-05-09 15:49:00 +08:00
Etan Cohen
477211720f Merge "[CS] Unregister callback as part of onUnavailable dispatch"
am: e2ba92c411

Change-Id: I14d3c0f6c606020bd1d1e756174a66ee933cb15f
2019-05-08 22:13:00 -07:00