Commit Graph

6115 Commits

Author SHA1 Message Date
Lorenzo Colitti
e4b197df63 Properly use versioned interfaces.
Our stable AIDL interfaces need to use versioned build targets,
otherwise getVersion will always return 0, which makes it
impossible to support different components at different versions.

List generated with:
find . -name Android.bp -exec egrep \
    -H "(netd|dnsresolver|ipmemorystore|networkstack).aidl.interface(s?)-(java|cpp)" {} \;

Bug: 133124190
Test: m
Change-Id: Id175c99daa77507847673777a8dcce51897ab17b
2019-05-22 03:12:59 +00:00
Treehugger Robot
06df06fdaf Merge "Move keepalive constants to their right place" 2019-05-21 02:01:30 +00:00
junyulai
a6b6fceb15 Move keepalive constants to their right place
The constants CMD_{ADD,REMOVE}_KEEPALIVE_PACKET_FILTER are too
high in the file and not in order. These constants should be
moved back to their rightful place.

Bug: 123987395
Test: 1. m -j 2. m -j doc-comment-check-docs
Change-Id: I44c827d3a2011cf7c66c0444566e14192fec1b1b
2019-05-21 00:23:41 +00:00
Ian Kasprzak
d20976e101 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
8175c6a3a9 Merge "Change the icon for the LOGGED_IN notification." 2019-05-17 04:15:51 +00:00
Lorenzo Colitti
53a20a376c 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
4f361df8e4 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
00c98116f2 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
6e8b516ac9 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
93f6dc8ab5 Merge "Ignore NetworkTest when running CtsNetTestCases in instant app mode"
am: 9f88ea3b3b

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

Change-Id: I065b5403d2f89d158e76f63c9b125ad30e603633
2019-05-14 04:06:04 -07:00
Paul Hu
b112d8b907 Merge "Fix captive portal app can be launched w/o MAINLINE_NETWORK_STACK permission" 2019-05-14 10:48:48 +00:00
paulhu
d203f7a358 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
3c6d05651b Merge "Clean up the permission control code in framework"
am: 2ecbe8b8b1

Change-Id: Iff2316f72df4cff56829b281882dc920d63937bd
2019-05-13 11:20:31 -07:00
Treehugger Robot
2ecbe8b8b1 Merge "Clean up the permission control code in framework" 2019-05-13 18:04:50 +00:00
Junyu Lai
bdf60ad814 Merge "Fix concurrent modification exception in KeepaliveTracker"
am: 25c06577c9

Change-Id: Ibd23240fdf8fb56b4216e2482152f605374f76db
2019-05-13 03:39:29 -07:00
Junyu Lai
25c06577c9 Merge "Fix concurrent modification exception in KeepaliveTracker" 2019-05-13 10:09:48 +00:00
junyulai
fe67da777b 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
69033e119e Merge "Add ApfCapabilities common test cases"
am: 9ac7ff1b2d

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

Change-Id: Iec27ecd2f0c0636b066fa0fe83c049fff656343f
2019-05-10 13:37:45 -07:00
Ian Kasprzak
2abe6c1f16 Merge "Reland: Add FrameworksNetTests dependency on libcgrouprc" 2019-05-10 20:08:54 +00:00
Ian Kasprzak
fee58be207 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
ebcdd2ee7a Merge "Clean up the arguments annotation and verify items on IpMemoryStoreTest."
am: 51aef6fe7b

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

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

Change-Id: I6522706917731a944483ad3cb9cdbc20447be6c2
2019-05-10 03:58:01 -07:00
Chalard Jean
faf2bd1a23 Merge "Support strict mode private DNS on VPNs that provide Internet." 2019-05-10 09:39:17 +00:00
Paul Hu
8311f56e69 Merge "Add LinkProperties common test cases"
am: 87794b0fde

Change-Id: I8f856d3851458e2a3f32034c9b9e1395123e0f89
2019-05-10 01:18:33 -07:00
Junyu Lai
0d58710edf Merge changes Ibcb91105,I0218f367
am: c797cf56ca

Change-Id: I4972d42657aa118e17240546c223723ed7b546ec
2019-05-10 01:14:05 -07:00
paulhu
b8e073c23a 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
b05101d4a5 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
87794b0fde Merge "Add LinkProperties common test cases" 2019-05-10 05:55:11 +00:00
Junyu Lai
c797cf56ca 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
ac456b2f36 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
becb2a3e86 Merge changes Ibff278a6,If6d537a3
am: 6eaf680338

Change-Id: If1d215b0fae85bfeeb5b6190abf4e4dc841912e5
2019-05-09 21:32:10 -07:00
Treehugger Robot
6eaf680338 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
85b76641ff [automerger skipped] Merge "DO NOT MERGE - Merge Pie Bonito/Sargo into master."
am: eee52ba403 -s ours
am skip reason: subject contains skip directive

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

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

Change-Id: I2cedf5752d37f96337ab69d94534cb7745e8efa3
2019-05-09 12:29:16 -07:00
Junyu Lai
d3f8253db4 Merge "Clean up the keepalive slots when network disconnect" 2019-05-09 18:53:03 +00:00
junyulai
a83c9f38a6 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
23409e34b4 Revert "Add NATT keepalive resources and methods into IpSecService"
This reverts commit cece56e3ce.

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
1f8bf657bb 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
15e26fb485 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
2a49c8de07 DO NOT MERGE - Merge Pie Bonito/Sargo into master.
Bug: 131756210
Change-Id: I77a701deda4935526ad452564f9bda77af345f46
2019-05-09 09:27:04 -07:00
Xiao Ma
bec60862c4 Merge "adopt non-blocking method to obtain the IpMemoryStore service."
am: 6c6c6272dd

Change-Id: Idd6110141795f86dcf28eafab87683eda4c70b93
2019-05-09 04:43:33 -07:00