Commit graph

5,327 commits

Message SHA1
Merge "Add IPv6 link-local address generation from EUI-48"
Etan Cohen   authored and   Gerrit Code Review   commited 2018-11-20 00:19:54 +00:00
fb0dcb1ed7
Merge "(Really) fix LingerMonitor rate limiting"
Treehugger Robot   authored and   Gerrit Code Review   commited 2018-11-19 07:14:11 +00:00
cf33708bcd
Add IPv6 link-local address generation from EUI-48
Add a utility method to convert an EUI-48 to an IPv6 link-local
address based on RFC 4291 (EUI-64 generation) followed by RFC 4862.

Bug: 117605977
Test: atest MacAddressTest
Merged-In: I80b683e69da6beff3b37fc345fc15aa9610d09b7
Change-Id: I80b683e69da6beff3b37fc345fc15aa9610d09b7

Etan Cohen   commited 2018-11-16 21:50:24 -08:00
ec1c466cb0
(Really) fix LingerMonitor rate limiting
The previous patch was applied to the wrong member and did not actually
fix the issue.

Bug: b/117516272
Test: remote run passed
Change-Id: I3f9c27ebd6c339e98a71cb179b0be65950f9b864

Remi NGUYEN VAN   commited 2018-11-16 14:53:14 +09:00
2fd1499f6a
Merge "Fix LingerMonitor notification rate limiting"
Treehugger Robot   authored and   Gerrit Code Review   commited 2018-11-13 09:36:39 +00:00
822d2b5991
Merge "Use spy in PermissionMonitorTest."
Junyu Lai   authored and   Gerrit Code Review   commited 2018-11-09 08:47:03 +00:00
e666ae6ee5
Use spy in PermissionMonitorTest.
Bug: 118811303
Test: runtest frameworks-net
Change-Id: Id61a9efecf1d1ed5a9045b78ecfec9239e13967b

junyulai   commited 2018-11-09 12:37:16 +08:00
4ae90ee86e
Add skip464xlat test in Nat464XlatTest
Bug: 69949375
Test: Nat464XlatTest, ConnectivityServiceTest

Change-Id: Ibc66d9c2dc8e3d1f118e5f6940e7b3fd4646efd1

soma, kawata   authored and   Chalard Jean   commited 2018-11-06 06:02:50 +00:00
4d041d5caa
Fix LingerMonitor notification rate limiting
If time since boot is lower than the rate limit, notifications would not
be shown.
This is causing tests to fail on continuous testing.

Test: atest FrameworksNetTests
Bug: b/117516272
Change-Id: I03da28f2ca61119fa0ef9534bb4ce3f6406c1ff2

Remi NGUYEN VAN   commited 2018-11-02 17:26:37 +09:00
1dd54da1f6
Merge "Support backward compatibility for restricted network permission"
Paul Hu   authored and   Gerrit Code Review   commited 2018-11-01 07:20:05 +00:00
3e8de1cade
Support backward compatibility for restricted network permission
Some native daemons legacy design work with SYSTEM_UID. If none of
SYSTEM_UID apps declare the restricted network permission, it will
result in permission denial in daemons. Allow SYSTEM_UID in the
devices shipped before Q to support backward compatibility.

Bug:114245686
Test: 1. runtest frameworks-net
      2. atest FrameworksNetTests
      3. Native daemons with SYSTEM_UID can work normally

Change-Id: I6f3f0d83bcae74ef5389535b528af3baf649fa48

paulhu   commited 2018-11-01 10:38:11 +08:00
8e38c05bb3
Fix negative uid stats caused by 464xlat adjust when eBPF is on.
When using xt_qtaguid to count per uid stats,
NetworkStatsService needs to adjust the 464xlat traffic since
iptables module would double count for ipv4 and ipv6 packet.
But for eBPF, the per uid stats is collected in a different
hook, so the adjustment on root uid would only be needed in tx
direction.

Bug: 112226716
Test: 1. Make ipv4 traffic in ipv6-only network and check data
         usage.
      2. Make ipv4 traffic in a client which connect to
         ipv6-only hotspot.
      3. runtest frameworks-net
      4. cts-tradefed run cts -m CtsNetTestCases -t \
                 android.net.cts.TrafficStatsTest
      5. cts-tradefed run cts -m CtsUsageStatsTestCases

Change-Id: Ic9a84f5446eddc943c255d5f3b89dad171f53cac

junyulai   commited 2018-10-30 21:23:38 +08:00
1d103a9809
Merge "Refactor UidRange by using stable aidl structure"
Treehugger Robot   authored and   Gerrit Code Review   commited 2018-10-29 00:17:34 +00:00
1742c23b88
Merge "ConnectivityService: make log configurable"
Chalard Jean   authored and   Gerrit Code Review   commited 2018-10-26 06:06:19 +00:00
3ec9281fa8
Merge "No-op refactoring of VPN lockdown status check."
Junyu Lai   authored and   Gerrit Code Review   commited 2018-10-26 05:35:28 +00:00
f694edec6f
Merge "Add more debug log when onBlockedStatusChanged was called."
Junyu Lai   authored and   Gerrit Code Review   commited 2018-10-25 08:57:56 +00:00
88c8503390
No-op refactoring of VPN lockdown status check.
Currently, if VPN lockdown is disabled, the blocking judgement
inside VPN will return false immediately. It will make
ConnectivityService hard to check blocked status by a given
VPN lockdown status.

Thus, move this check into ConnectivityService and check it
externally.

Bug: 117814902
Test: 1. manual test with 3rd-party vpn app
      2. runtest frameworks-net

Change-Id: Ia8319b1a1a12f1058c24badf2431f2ec69bc78e7

junyulai   commited 2018-10-25 16:43:50 +08:00
e06923946c
Add more debug log when onBlockedStatusChanged was called.
Bug: 118355916
Test: 1. runtest frameworks-net
      2. enable/disable battery saver

Change-Id: I6d5f9b49be0defd531fc7ea824668bec7863c4b7

junyulai   commited 2018-10-25 15:20:01 +08:00
29e8abebca
Merge pie-platform-release to aosp-master - DO NOT MERGE
Change-Id: I695db52f5e22509401258e8b083e7650d401d993

Bill Yi   commited 2018-10-24 14:48:44 -07:00
78ab033fd4
Refactor UidRange by using stable aidl structure
Use stable aidl generated structure instead of UidRange

Test: runtest frameworks-net passes
Test: manual testing of UidRange related function works
Change-Id: Iaf1c10777dc1e71df2be2a57533a10257b12626b

Luke Huang   commited 2018-10-24 19:45:09 +09:00
477db5fe1a
Merge "To support skip464xlat per Network"
Chalard Jean   authored and   Gerrit Code Review   commited 2018-10-24 07:15:20 +00:00
698b80818c
Merge "Move some members to the "Q blacklist"."
Nathan Harold   authored and   Gerrit Code Review   commited 2018-10-23 21:53:51 +00:00
26f91069c1
Move some members to the "Q blacklist".
Based on some analysis, these fields/methods are likely false positives.
Set maxTargetSdk=P so that any apps using them are required to migrate off
them in future. See the bug for more details.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Merged-In: I719b5c94e5b1f4fa562dd5d655953422958ad37e
Change-Id: I719b5c94e5b1f4fa562dd5d655953422958ad37e
(cherry picked from commit 2622bdf569)

Mathew Inwood   authored and   Nathan Harold   commited 2018-10-22 17:28:24 -07:00
0e71d36c58
ConnectivityService: make log configurable
Make log of ConnectivityService configurable by system property.

Two levels:
VERBOSE: whole VDBG log.
DEBUG: selected necessary log for debug purpose.

Relevant log can be enbled in either way:
1. use adb command at run time.
2. config init.xx.rc file at compile time by adding.
on boot && property:ro.build.type=userdebug
    setprop log.tag.ConnectivityService DEBUG

Bug: 117632924
Change-Id: I43cc84878c64c5b448853c7393393a02262afd15

hiroaki.yokoyama   authored and   Fen Wang   commited 2018-10-22 15:59:17 +09:00
a1a397d1d1
Merge "Add tests for the network blocked status change"
am: bbc0585a03

Change-Id: I0f3f93807d9089239f572c487d791acd7a324a2e

Junyu Lai   authored and   android-build-merger   commited 2018-10-19 09:18:38 -07:00
e302f75920
Merge "Add new callback to inform blocking of network on specific uid."
am: f41deeb4a9

Change-Id: Ia99ee2fbefa67a7ee00d6fecce430ba6431945cd

Junyu Lai   authored and   android-build-merger   commited 2018-10-19 09:14:23 -07:00
118cf0e236
Merge "Add tests for the network blocked status change"
Junyu Lai   authored and   Gerrit Code Review   commited 2018-10-19 15:20:48 +00:00
bbc0585a03
Merge "Add new callback to inform blocking of network on specific uid."
Junyu Lai   authored and   Gerrit Code Review   commited 2018-10-19 15:20:48 +00:00
f41deeb4a9
Add tests for the network blocked status change
onBlockedStatusChanged is intruduced for network blocked status.
The changes in this patch are:
  - Test onBlockedStatusChanged which tells apps whether the
    network is blocked.
  - Fixed the tests which is affected by the order changed in
    onAvailable.

Test: as follows
    - runtest frameworks-net
    - runtest -x NetworkPolicyManagerServiceTest.java
Bug: 74575553
Change-Id: I383c037ed895ef69c478dc3cff69fb1e27c42845

Mike Yu   commited 2018-10-19 19:52:50 +08:00
96612aedb1
Merge changes I66e40b4b,I599a2ff9,I7c210623
am: e70b760e83

Change-Id: Iba4bb6d1676d889f1e4a781a7970f01c0e321275

Chalard Jean   authored and   android-build-merger   commited 2018-10-16 09:14:22 -07:00
26e6255faa
Merge changes I66e40b4b,I599a2ff9,I7c210623
* changes:
  [PT16] Simplification of sendProxyBroadcast.
  [PT15] Tiny bugfix in setGlobalProxy
  [PT14] No-op refactoring of sendProxyBroadcast

Treehugger Robot   authored and   Gerrit Code Review   commited 2018-10-16 14:48:33 +00:00
e70b760e83
Merge "Network-related commands porting"
am: 5f81fcf08d

Change-Id: I96b2bb80cca6e9d80f3f0fe08f7b71ce31b67528

Luke Huang   authored and   android-build-merger   commited 2018-10-16 01:09:30 -07:00
39fe20e389
Merge "Network-related commands porting"
Luke Huang   authored and   Gerrit Code Review   commited 2018-10-16 07:44:37 +00:00
5f81fcf08d
Merge changes into stage-aosp-master
Android Build Merger (Role)   authored and   Android (Google) Code Review   commited 2018-10-15 22:44:53 +00:00
e43baff38b
Merge changes into stage-aosp-master
Android Build Merger (Role)   authored and   Android (Google) Code Review   commited 2018-10-15 22:44:53 +00:00
214f2425b6
Merge "Change permissions checks for setAirplaneMode."
am: 38149e3ea7

Change-Id: I578923c3f9012055f715e536f5d4d42ed669c5ee

Lorenzo Colitti   authored and   android-build-merger   commited 2018-10-15 08:03:52 -07:00
65b71e6a20
Merge changes into stage-aosp-master
Android Build Merger (Role)   authored and   Android (Google) Code Review   commited 2018-10-15 15:00:04 +00:00
9d4ecb210e
Merge changes into stage-aosp-master
Android Build Merger (Role)   authored and   Android (Google) Code Review   commited 2018-10-15 15:00:04 +00:00
370172f67b
Merge "Change permissions checks for setAirplaneMode."
Lorenzo Colitti   authored and   Gerrit Code Review   commited 2018-10-15 13:36:45 +00:00
38149e3ea7
[PT16] Simplification of sendProxyBroadcast.
sendProxyBroadcast is always called with the same argument, and
it would make no sense with another argument anyway. Remove it.

This concludes the ProxyTracker refactoring with 227 lines removed
from ConnectivityService, a lot clarified, and some bugs removed.
Things can still be improved, but presumably at a much higher cost.

Next steps are : write tests, now that ProxyTracker is both testable
and mockable. And try to pour some gasoline on the PROXY_CHANGE_ACTION
broadcast, see if it burns well.

Test: runtest
Change-Id: I66e40b4bf5cfd0b2dc4fa37ea97b3429fe1b7e6c

Chalard Jean   commited 2018-10-15 12:58:41 +09:00
110cb12040
[PT15] Tiny bugfix in setGlobalProxy
This bug has existed for a long time. If mDefaultProxyEnabled is
false, then the mDefaultProxy member should obviously not be used
in the broadcast.

Test: runtest
Change-Id: I599a2ff9f96d4667e824cf000c2125f86010bb02

Chalard Jean   commited 2018-10-15 12:58:41 +09:00
0d21a064a6
[PT14] No-op refactoring of sendProxyBroadcast
If mGlobalProxy is non-null, then getDefaultProxy returns mGlobalProxy
so the first change is a no-op.
If mGlobalProxy is null and mDefaultProxyEnabled is true, then
getDefaultProxy returns mDefaultProxy, which has just been set to
proxyInfo, so the second change is a no-op.
If mGlobalProxy is null and mDefaultProxyEnabled is true, then
getDefaultProxy returns mDefaultProxy ; if mGlobalProxy is null and
mDefaultProxyEnabled is false, then getDefaultProxy returns null,
therefore the third change is a no-op.

Test: runtest
Change-Id: I7c21062302bf54f4fc917c82e0175975051a55ec

Chalard Jean   commited 2018-10-15 12:58:40 +09:00
1836a63e92
Merge "[PT13] Simple cleanup of ProxyTracker."
am: db2eff0874

Change-Id: I6a30f78e517716ca3ff14a3601374fddc65e4aec

Chalard Jean   authored and   android-build-merger   commited 2018-10-12 00:50:29 -07:00
1e161fd7b5
Change permissions checks for setAirplaneMode.
Require NETWORK_SETTINGS (or NETWORK_SETUP_WIZARD) instead of the
legacy CONNECTIVITY_INTERNAL permission. The users are as follows:

- The system callers (Phone, Settings, SystemUI, VrSettings) all
  have NETWORK_SETTINGS.
- SetupWizard has NETWORK_SETUP_WIZARD
- sl4a has NETWORK_STACK

Bug: 115302596
Test: builds, boots, airplane mode via SystemUI works
Change-Id: I8ca40182bd8b5e3fd9a82296c0cc28de30ed4baf

Lorenzo Colitti   commited 2018-10-12 16:35:46 +09:00
c7da00d199
Merge "[PT13] Simple cleanup of ProxyTracker."
Chalard Jean   authored and   Gerrit Code Review   commited 2018-10-12 07:34:43 +00:00
db2eff0874
Merge "[PT12] Factor some code into ProxyTracker."
am: 665502961c

Change-Id: Ib92107f434576d8296ba74aab0d9abfe56cefa7c

Chalard Jean   authored and   android-build-merger   commited 2018-10-11 22:55:28 -07:00
a0785d1a0e
To support skip464xlat per Network
To add skip464exlat in NetworkMisc.
NetworkAgent can skip to start 464xlat if need.
(e.g. IMS PDN for Cellular can be disabled)

Device will treat the network as IPv6-only if it is set

Bug: 69949375
Test: Nat464XlatTest, ConnectivityServiceTest

Change-Id: I676a02cb92530d64f29f34e89482a934f3ec4553

Yuuki Habu   commited 2018-10-12 14:35:30 +09:00
addf827426
Merge "[PT12] Factor some code into ProxyTracker."
Chalard Jean   authored and   Gerrit Code Review   commited 2018-10-12 04:23:16 +00:00
665502961c
Merge "Add log for debugging ConnectivityManager"
am: 12f8847e40

Change-Id: I666e534f42a930a2d0fee55032d7a9e4516349c0

Chalard Jean   authored and   android-build-merger   commited 2018-10-11 21:11:51 -07:00
7a6ad8e2a9
Merge "Add log for debugging ConnectivityManager"
Chalard Jean   authored and   Gerrit Code Review   commited 2018-10-12 03:14:48 +00:00
12f8847e40