Commit Graph

6598 Commits

Author SHA1 Message Date
Lorenzo Colitti
d0ec23930e Merge "Merge changes I4f181789,Ia8a0c99b am: f7d42a0a3c am: 7e04c116a3" into qt-dev-plus-aosp
am: 9d301638d1

Change-Id: Id57ce4ff83e38b21f293d109287fadb15c2429a3
2019-04-12 08:13:50 -07:00
Remi NGUYEN VAN
d3050e2746 Merge "Revert "Block incoming non-VPN packets to apps under fully-routed VPN"" am: 01bfd9e510 am: f7fe1ac9c4
am: f2654ce048

Change-Id: I7807613ec8c6667dcc994ae4eb3e13bab387f10a
2019-04-12 07:44:57 -07:00
Lorenzo Colitti
4a84f8cb71 Merge changes I4f181789,Ia8a0c99b am: f7d42a0a3c
am: 7e04c116a3

Change-Id: Ib59e211d4329f885108de9ea0a74669ffb144e17
2019-04-12 06:37:28 -07:00
Lorenzo Colitti
7e04c116a3 Merge changes I4f181789,Ia8a0c99b
am: f7d42a0a3c

Change-Id: I50207fe29953be7759bbd01cb93268202067f764
2019-04-12 06:29:44 -07:00
Remi NGUYEN VAN
f2654ce048 Merge "Revert "Block incoming non-VPN packets to apps under fully-routed VPN"" am: 01bfd9e510
am: f7fe1ac9c4

Change-Id: I3e1c408fcfc14db8b2586a79416233ffe9e1173d
2019-04-12 06:24:30 -07:00
Lorenzo Colitti
f7d42a0a3c Merge changes I4f181789,Ia8a0c99b
* changes:
  Revert new tests and PackageManager mock
  Revert "Revert "Block incoming non-VPN packets to apps under fully-routed VPN""
2019-04-12 13:11:18 +00:00
Luke Huang
fd4c9b399f Merge "API council feedbacks for DnsResolver" am: 65dc1155ff am: dca57c2e44
am: b2acaecb20

Change-Id: I6923d0188f30dd06372da38a77f6cc654bdc714d
2019-04-12 06:04:19 -07:00
Luke Huang
b2acaecb20 Merge "API council feedbacks for DnsResolver" am: 65dc1155ff
am: dca57c2e44

Change-Id: Id731f73f25f437df94f936e9a3ec227b797b6031
2019-04-12 05:31:10 -07:00
Lorenzo Colitti
c18f4b5f6f Revert new tests and PackageManager mock
A mocked PackageManager caused test failures in existing tests.
Revert that for now to make tests pass again.

Bug: 114231106
Bug: 130397860
Test: atest FrameworksNetTests
Change-Id: I4f181789152438f18e6cd2d235d76fabe3872ea3
2019-04-12 19:52:45 +09:00
Lorenzo Colitti
ee6a630257 Revert "Revert "Block incoming non-VPN packets to apps under fully-routed VPN""
This reverts commit 2b6cd177ba.

Reason for revert: Rolling forward, will fix tests in same CL stack.

Bug: 114231106
Bug: 130397860
Test: FrameworksNetTests
Change-Id: Ia8a0c99b4e1fd5dff26c881715cd876618ca4321
2019-04-12 19:52:32 +09:00
Remi NGUYEN VAN
f7fe1ac9c4 Merge "Revert "Block incoming non-VPN packets to apps under fully-routed VPN""
am: 01bfd9e510

Change-Id: I601649e15c97a8fd1732c4d38dab9d5556c5f175
2019-04-12 03:41:01 -07:00
Remi NGUYEN VAN
01bfd9e510 Merge "Revert "Block incoming non-VPN packets to apps under fully-routed VPN"" 2019-04-12 10:25:46 +00:00
Remi NGUYEN VAN
2b6cd177ba Revert "Block incoming non-VPN packets to apps under fully-routed VPN"
This reverts commit 1c19cf383f.
This change does not have any topic: not reverting the other 2 commits in the original topic.

Reason for revert: broke FrameworksNetTests presubmit: b/130397860

Change-Id: Iff41d9fe97fafea44680c8d67d1ce19277548cc0
2019-04-12 09:05:40 +00:00
Benedict Wong
45a2510d5c [automerger skipped] Merge changes I98573a5c,Ic7394f24 into qt-dev am: 3b5424047c -s ours
am: 913829e75a -s ours
am skip reason: change_id I98573a5c68e45abbbaddef01f6ac74a6a18e26f9 with SHA1 0fed3d2c01 is in history

Change-Id: Ib5c3e6b7f7a3b766d6119451af3f77b7ea2f5052
2019-04-11 19:41:53 -07:00
Lorenzo Colitti
be9e0d30f5 [automerger skipped] Merge "Add support for TAP interfaces in TestNetworkManager." into qt-dev am: 5c7c6a4b7d -s ours
am: 2c005f2cd2 -s ours
am skip reason: change_id I88bfd7f37c0ba0228f8288fe92212618ce134e4f with SHA1 4f370cefa2 is in history

Change-Id: Ia633c9de407a62075e05efa807a017013fc028ce
2019-04-11 18:27:27 -07:00
Benedict Wong
913829e75a [automerger skipped] Merge changes I98573a5c,Ic7394f24 into qt-dev
am: 3b5424047c -s ours
am skip reason: change_id I98573a5c68e45abbbaddef01f6ac74a6a18e26f9 with SHA1 0fed3d2c01 is in history

Change-Id: I80f0924a1a1f83962c6dee7fd937a341075327e4
2019-04-11 18:19:05 -07:00
TreeHugger Robot
3b5424047c Merge changes I98573a5c,Ic7394f24 into qt-dev
* changes:
  Enable checks for MANAGE_TEST_NETWORKS in TestNetworkService
  Cleanup of Test Network service
2019-04-12 00:54:45 +00:00
Luke Huang
dca57c2e44 Merge "API council feedbacks for DnsResolver"
am: 65dc1155ff

Change-Id: I5737cf293264bf9d492e7bd56b62bee4d49002eb
2019-04-11 17:54:41 -07:00
Luke Huang
65dc1155ff Merge "API council feedbacks for DnsResolver" 2019-04-12 00:45:18 +00:00
Lorenzo Colitti
2c005f2cd2 [automerger skipped] Merge "Add support for TAP interfaces in TestNetworkManager." into qt-dev
am: 5c7c6a4b7d -s ours
am skip reason: change_id I88bfd7f37c0ba0228f8288fe92212618ce134e4f with SHA1 4f370cefa2 is in history

Change-Id: If600c79a42b040f8323800cc2b6a145d5efb2c39
2019-04-11 17:27:40 -07:00
Rubin Xu
51a04b4c94 Merge "Block incoming non-VPN packets to apps under fully-routed VPN" am: 02040de8b1 am: 594df97559
am: c81642f1a1

Change-Id: I7b881d5519609fd2bdf4243c7c2038b25cb79bf4
2019-04-11 13:57:21 -07:00
Benedict Wong
86bf1b0a6c Enable checks for MANAGE_TEST_NETWORKS in TestNetworkService
This commit re-enables enforcement of the MANAGE_TEST_NETWORK
permission, which is only granted to the shell. CTS tests using this
permission should use UiAutomation.adoptShellPermissionIdentity() to
gain access.

Bug: 72950854
Test: IPsec CTS tests using this passing
Change-Id: I98573a5c68e45abbbaddef01f6ac74a6a18e26f9
Merged-In: I98573a5c68e45abbbaddef01f6ac74a6a18e26f9
(cherry picked from commit 0fed3d2c01)
2019-04-11 20:04:19 +00:00
Benedict Wong
dee1ea74c1 Cleanup of Test Network service
This follow-up change performs some cleanup changes without affecting
functionality

Bug: 72950854
Test: Compiles, CTS tests using this pass
Change-Id: Ic7394f24f11d713c9374b438182e29d2a02ea236
Merged-In: Ic7394f24f11d713c9374b438182e29d2a02ea236
(cherry picked from commit 5f6bc9d438)
2019-04-11 20:04:06 +00:00
Lorenzo Colitti
c8304b5a13 Merge "Add support for TAP interfaces in TestNetworkManager." am: 5ceee7e861 am: 7f5140a668
am: 1941874a02

Change-Id: I73c565cd69367cd7075c70cfa30d7f09c70acac0
2019-04-11 12:56:32 -07:00
Rubin Xu
c81642f1a1 Merge "Block incoming non-VPN packets to apps under fully-routed VPN" am: 02040de8b1
am: 594df97559

Change-Id: I5af81bc80dadd086261ba4b1eb706cc873bb7cfa
2019-04-11 11:45:43 -07:00
Lorenzo Colitti
1941874a02 Merge "Add support for TAP interfaces in TestNetworkManager." am: 5ceee7e861
am: 7f5140a668

Change-Id: I29daac925c4b64bda111ba187b1759b6ce8a5f23
2019-04-11 11:32:46 -07:00
Benedict Wong
e69771d682 Merge changes I98573a5c,Ic7394f24 am: ca3c2504b5 am: d4b112fee1
am: 972562ea00

Change-Id: I8d5df64d64cbf7239e207431147690f04bf2089c
2019-04-11 11:00:51 -07:00
Benedict Wong
972562ea00 Merge changes I98573a5c,Ic7394f24 am: ca3c2504b5
am: d4b112fee1

Change-Id: I279765199a80b0639dde31302778a95c0f9fd705
2019-04-11 10:05:20 -07:00
Rubin Xu
594df97559 Merge "Block incoming non-VPN packets to apps under fully-routed VPN"
am: 02040de8b1

Change-Id: I321a96599e51b70817b2514455c43972cd1fbca8
2019-04-11 09:56:11 -07:00
Rubin Xu
02040de8b1 Merge "Block incoming non-VPN packets to apps under fully-routed VPN" 2019-04-11 16:46:16 +00:00
Luke Huang
d836918ca6 API council feedbacks for DnsResolver
To address the API review feedback provided by
the API council.

Bug: 129261432
Test: atest DnsResolverTest
Change-Id: I3de11c913682abf790850b45cd5d50ac28b3fc5c
2019-04-11 22:17:20 +08:00
Junyu Lai
d105c633ed [automerger skipped] Merge "Fix onBlockedStatusChanged does not work on multiple networks" into qt-dev am: b207526a0b -s ours
am: bfc9bf6d8e -s ours
am skip reason: change_id Ifd18d1c6ad708c1dbc793f03d8241f572af50317 with SHA1 ec82da1166 is in history

Change-Id: Iba8d6c9729a41420b4a55c8dbac3b4533f3b3789
2019-04-11 07:05:36 -07:00
Lorenzo Colitti
88c709e6e6 Add support for TAP interfaces in TestNetworkManager.
Bug: 72950854
Test: builds, boots
Change-Id: I88bfd7f37c0ba0228f8288fe92212618ce134e4f
Merged-In: I88bfd7f37c0ba0228f8288fe92212618ce134e4f
(cherry picked from commit 7f5140a668)
2019-04-11 12:04:23 +00:00
Lorenzo Colitti
7f5140a668 Merge "Add support for TAP interfaces in TestNetworkManager."
am: 5ceee7e861

Change-Id: I834ba4b939f67ff3e1c84a39844085dccc1d8d8e
2019-04-11 04:59:16 -07:00
Lorenzo Colitti
5ceee7e861 Merge "Add support for TAP interfaces in TestNetworkManager." 2019-04-11 11:45:40 +00:00
Remi NGUYEN VAN
7177a5f483 [automerger skipped] Merge "Expose captive portal urls for configuration" into qt-dev am: c7a083a15e -s ours
am: c5874b3681 -s ours
am skip reason: change_id I54050b28bbfb93e0b7e509dbe0e987a0b902b7d9 with SHA1 9b84ea14a8 is in history

Change-Id: I6b63d5a41593844cd213e2e9000671f3390bec2b
2019-04-11 03:20:43 -07:00
Junyu Lai
bfc9bf6d8e [automerger skipped] Merge "Fix onBlockedStatusChanged does not work on multiple networks" into qt-dev
am: b207526a0b -s ours
am skip reason: change_id Ifd18d1c6ad708c1dbc793f03d8241f572af50317 with SHA1 ec82da1166 is in history

Change-Id: I1a1cac47a948636d6dae934edb3fbf42327f5314
2019-04-11 01:48:50 -07:00
Junyu Lai
b207526a0b Merge "Fix onBlockedStatusChanged does not work on multiple networks" into qt-dev 2019-04-11 06:58:48 +00:00
Remi NGUYEN VAN
c5874b3681 [automerger skipped] Merge "Expose captive portal urls for configuration" into qt-dev
am: c7a083a15e -s ours
am skip reason: change_id I54050b28bbfb93e0b7e509dbe0e987a0b902b7d9 with SHA1 9b84ea14a8 is in history

Change-Id: I15a4acf4355e05833ed15bde3deb0db966f2a75a
2019-04-10 23:31:51 -07:00
Remi NGUYEN VAN
c7a083a15e Merge "Expose captive portal urls for configuration" into qt-dev 2019-04-11 03:44:08 +00:00
Benedict Wong
e3c4fe1d23 [automerger skipped] Merge "Fix remove-before-add for IpSecService RefcountedResource" into qt-dev am: 610eed67b6 -s ours
am: 214d280eb8 -s ours
am skip reason: change_id I6db75853da9f29e1573512e26351623f22770c5d with SHA1 4dba79cc89 is in history

Change-Id: Ibecfa12754acbdce0eb3369d1577eedea91ecaa4
2019-04-10 12:14:07 -07:00
Benedict Wong
214d280eb8 [automerger skipped] Merge "Fix remove-before-add for IpSecService RefcountedResource" into qt-dev
am: 610eed67b6 -s ours
am skip reason: change_id I6db75853da9f29e1573512e26351623f22770c5d with SHA1 4dba79cc89 is in history

Change-Id: I3e0bd244d8a2ddf86cf4dab99d4a563ea1e2b01e
2019-04-10 11:14:47 -07:00
Benedict Wong
d4b112fee1 Merge changes I98573a5c,Ic7394f24
am: ca3c2504b5

Change-Id: I2ffeb6ef1a19f7b2982c3631fe2c040024fb53cb
2019-04-10 11:00:10 -07:00
Benedict Wong
ca3c2504b5 Merge changes I98573a5c,Ic7394f24
* changes:
  Enable checks for MANAGE_TEST_NETWORKS in TestNetworkService
  Cleanup of Test Network service
2019-04-10 17:06:17 +00:00
Rubin Xu
1c19cf383f Block incoming non-VPN packets to apps under fully-routed VPN
When a fully-routed VPN is running, we want to prevent normal apps
under the VPN from receiving packets originating from any local non-VPN
interfaces. This is achieved by using eBPF to create a per-UID input
interface whitelist and populate the whitelist such that all
non-bypassable apps under a VPN can only receive packets from the VPN's
TUN interface (and loopback implicitly)

This is the framework part of the change that build the whitelist.
The whitelist needs to be updated in the following cases:
* When a VPN is connected and disconnected
    This will cover the change to allowBypass bit, since that can't be
    changed without reconnecting.
* When a VPN's NetworkCapabilites is changed (whitelist/blacklist app changes)
* When a new app is installed
* When an existing app is removed
* When a VPN becomes fully-routed or is no longer fully-routed

New user/profile creation will automatically result in a whitelist app change
transition so it doesn't need to be handled specially here.

Due to the limitation of the kernel IPSec interacting with eBPF (sk_buf->ifindex
does not point to the virtual tunnel interface for kernel IPSec), the whitelist
will only apply to app VPNs but not legacy VPN connections, to prevent breaking
connectivity with kernel IPSec entirely.

Test: atest PermissionMonitorTest
Test: atest android.net.RouteInfoTest
Test: atest com.android.server.ConnectivityServiceTest
Test: atest HostsideVpnTests
Bug: 114231106
Change-Id: I143b03d60e46cb1b04732b4a4034f5847b4d1b1a
2019-04-10 17:05:54 +01:00
Remi NGUYEN VAN
9213759d2a Merge "Merge "Fix comment on StaticIpConfiguration#getDomains" am: a430dae4b7 am: a87e7d5a41" into qt-dev-plus-aosp
am: d084c945d1

Change-Id: I4f490fa9190c38657f146326cf1133c1333d0ca2
2019-04-10 03:02:00 -07:00
Chenbo Feng
55bcf5abd7 Merge "Add smoke test for jni library" am: d38640b7d5 am: 46a3c2c655
am: ec134363c0

Change-Id: I1078ad41f5c04d6d2e07879dfae19c31534b763b
2019-04-10 02:42:26 -07:00
Remi NGUYEN VAN
c24d2af084 Merge "Fix comment on StaticIpConfiguration#getDomains" am: a430dae4b7
am: a87e7d5a41

Change-Id: I6a2ff0368193aaa988585613d99662a01cf4fa26
2019-04-10 00:07:05 -07:00
Chenbo Feng
ec134363c0 Merge "Add smoke test for jni library" am: d38640b7d5
am: 46a3c2c655

Change-Id: Iba607c906917017f79f141f4e0599a2330cc0f14
2019-04-10 00:01:28 -07:00
Remi NGUYEN VAN
a87e7d5a41 Merge "Fix comment on StaticIpConfiguration#getDomains"
am: a430dae4b7

Change-Id: Ia664b08eabe344470a5c08e5510f1a8f7132ac73
2019-04-09 23:54:09 -07:00