Commit Graph

5340 Commits

Author SHA1 Message Date
Etan Cohen
3ec717f4e7 Merge "Add IPv6 link-local address generation from EUI-48"
am: 5d8e697a85

Change-Id: I463cc804b21c99512e506b60a44cd62732d3c2b2
2018-11-19 16:38:06 -08:00
Etan Cohen
5d8e697a85 Merge "Add IPv6 link-local address generation from EUI-48" 2018-11-20 00:19:54 +00:00
Remi NGUYEN VAN
6ca65797af Merge "(Really) fix LingerMonitor rate limiting"
am: 120fa0b015

Change-Id: I3b03f5985137a57e7c3ed3b2e0030078a4ea676d
2018-11-18 23:26:25 -08:00
Treehugger Robot
120fa0b015 Merge "(Really) fix LingerMonitor rate limiting" 2018-11-19 07:14:11 +00:00
Etan Cohen
1b2d62a1bc 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
2018-11-16 21:50:24 -08:00
Remi NGUYEN VAN
0d1ed386ed (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
2018-11-16 14:53:14 +09:00
Remi NGUYEN VAN
160e47e6e1 Merge "Fix LingerMonitor notification rate limiting"
am: 506c6bd17e

Change-Id: I68800c06e8d4413b2e46176a12dc60b436277653
2018-11-13 01:46:21 -08:00
Treehugger Robot
506c6bd17e Merge "Fix LingerMonitor notification rate limiting" 2018-11-13 09:36:39 +00:00
Junyu Lai
1f24248aa7 Merge "Use spy in PermissionMonitorTest."
am: c5a03a68d9

Change-Id: I6074b6fb2f90821ddad93db18fbb633225b4292f
2018-11-09 01:01:25 -08:00
Junyu Lai
c5a03a68d9 Merge "Use spy in PermissionMonitorTest." 2018-11-09 08:47:03 +00:00
junyulai
2c54072845 Use spy in PermissionMonitorTest.
Bug: 118811303
Test: runtest frameworks-net
Change-Id: Id61a9efecf1d1ed5a9045b78ecfec9239e13967b
2018-11-09 12:37:16 +08:00
soma, kawata
0b6a961580 Merge "Add skip464xlat test in Nat464XlatTest"
am: aef8fe0d47

Change-Id: If437d8eadbc81655756b9b7cac1a5cda019a45da
2018-11-08 05:00:10 -08:00
soma, kawata
dbfbaf5e63 Add skip464xlat test in Nat464XlatTest
Bug: 69949375
Test: Nat464XlatTest, ConnectivityServiceTest

Change-Id: Ibc66d9c2dc8e3d1f118e5f6940e7b3fd4646efd1
2018-11-06 06:02:50 +00:00
Remi NGUYEN VAN
032dfe5ce5 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
2018-11-02 17:26:37 +09:00
Paul Hu
448fae5621 Merge "Support backward compatibility for restricted network permission"
am: 3f6664e4f1

Change-Id: I15ef9c6efd40e8fe9bb9ff6ae98cae556dc0f8fd
2018-11-01 00:33:39 -07:00
Paul Hu
3f6664e4f1 Merge "Support backward compatibility for restricted network permission" 2018-11-01 07:20:05 +00:00
paulhu
3c935061bb 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
2018-11-01 10:38:11 +08:00
Junyu Lai
b85f70b758 Merge "Fix negative uid stats caused by 464xlat adjust when eBPF is on."
am: 0d63da86e2

Change-Id: Ia5120619ce7d5cedd6e558ed4d1dc9a706638796
2018-10-30 19:35:32 -07:00
junyulai
431d07e60a 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
2018-10-30 21:23:38 +08:00
Luke Huang
be9bc6d666 Merge "Refactor UidRange by using stable aidl structure"
am: e966e640f6

Change-Id: I9ac52f3869fe051d0ef7f45768f1defad155b53b
2018-10-28 17:44:20 -07:00
Treehugger Robot
e966e640f6 Merge "Refactor UidRange by using stable aidl structure" 2018-10-29 00:17:34 +00:00
Chalard Jean
e8f66a6625 Merge "ConnectivityService: make log configurable"
am: 4c876ff706

Change-Id: I5991e26198aa5d5ad809e2585984cb643889a9d1
2018-10-25 23:22:48 -07:00
Chalard Jean
4c876ff706 Merge "ConnectivityService: make log configurable" 2018-10-26 06:06:19 +00:00
Junyu Lai
866ad8df15 Merge "No-op refactoring of VPN lockdown status check."
am: ec52e89628

Change-Id: I8aab0dd1556b49cafc08d57a8981051ba437fe44
2018-10-25 22:50:34 -07:00
Junyu Lai
ec52e89628 Merge "No-op refactoring of VPN lockdown status check." 2018-10-26 05:35:28 +00:00
Junyu Lai
cfc3235893 Merge "Add more debug log when onBlockedStatusChanged was called."
am: 4a62810d90

Change-Id: I6f5e1af022e43e954b019894a5efb4e6cf8d4846
2018-10-25 02:35:52 -07:00
Junyu Lai
4a62810d90 Merge "Add more debug log when onBlockedStatusChanged was called." 2018-10-25 08:57:56 +00:00
junyulai
4526f99b5e 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
2018-10-25 16:43:50 +08:00
junyulai
3a07d8b87d Add more debug log when onBlockedStatusChanged was called.
Bug: 118355916
Test: 1. runtest frameworks-net
      2. enable/disable battery saver

Change-Id: I6d5f9b49be0defd531fc7ea824668bec7863c4b7
2018-10-25 15:20:01 +08:00
Bill Yi
82c3e8e924 [automerger skipped] Merge pie-platform-release to aosp-master - DO NOT MERGE
am: 6155b25f24  -s ours

Change-Id: I2c4b9184789a1bdae2cec06e0e72f6c6ca049113
2018-10-24 17:17:46 -07:00
Bill Yi
6155b25f24 Merge pie-platform-release to aosp-master - DO NOT MERGE
Change-Id: I695db52f5e22509401258e8b083e7650d401d993
2018-10-24 14:48:44 -07:00
Bill Yi
6fab283a18 Merge pi-platform-release to stage-aosp-master - DO NOT MERGE
Change-Id: I13571b072111900d0979f026670e648cdef9899b
2018-10-24 09:08:38 -07:00
Luke Huang
40f9fcef6f 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
2018-10-24 19:45:09 +09:00
Chalard Jean
2d23f14c9e Merge "To support skip464xlat per Network" 2018-10-24 07:15:20 +00:00
Nathan Harold
8d6a9818f0 Merge "Move some members to the "Q blacklist"." 2018-10-23 21:53:51 +00:00
Mathew Inwood
df1c689315 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 15cfeb58a4)
2018-10-22 17:28:24 -07:00
hiroaki.yokoyama
c510b2732a 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
2018-10-22 15:59:17 +09:00
Junyu Lai
cd2c08a219 Merge "Add tests for the network blocked status change"
am: f1d996ac11

Change-Id: I0f3f93807d9089239f572c487d791acd7a324a2e
2018-10-19 09:18:38 -07:00
Junyu Lai
d896c9a4e5 Merge "Add new callback to inform blocking of network on specific uid."
am: c7a2d957b0

Change-Id: Ia99ee2fbefa67a7ee00d6fecce430ba6431945cd
2018-10-19 09:14:23 -07:00
Junyu Lai
f1d996ac11 Merge "Add tests for the network blocked status change" 2018-10-19 15:20:48 +00:00
Junyu Lai
c7a2d957b0 Merge "Add new callback to inform blocking of network on specific uid." 2018-10-19 15:20:48 +00:00
Mike Yu
b8c1f78f0d 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
2018-10-19 19:52:50 +08:00
Chalard Jean
2a01b50b17 Merge changes I66e40b4b,I599a2ff9,I7c210623
am: 7b0604a191

Change-Id: Iba4bb6d1676d889f1e4a781a7970f01c0e321275
2018-10-16 09:14:22 -07:00
Treehugger Robot
7b0604a191 Merge changes I66e40b4b,I599a2ff9,I7c210623
* changes:
  [PT16] Simplification of sendProxyBroadcast.
  [PT15] Tiny bugfix in setGlobalProxy
  [PT14] No-op refactoring of sendProxyBroadcast
2018-10-16 14:48:33 +00:00
Luke Huang
cb8425b803 Merge "Network-related commands porting"
am: f1b3ef44bc

Change-Id: I96b2bb80cca6e9d80f3f0fe08f7b71ce31b67528
2018-10-16 01:09:30 -07:00
Luke Huang
f1b3ef44bc Merge "Network-related commands porting" 2018-10-16 07:44:37 +00:00
Android Build Merger (Role)
8d8d06494a Merge changes into stage-aosp-master 2018-10-15 22:44:53 +00:00
Android Build Merger (Role)
8b21e345c6 Merge changes into stage-aosp-master 2018-10-15 22:44:53 +00:00
Lorenzo Colitti
001a9fdc97 Merge "Change permissions checks for setAirplaneMode."
am: 7b81c459ce

Change-Id: I578923c3f9012055f715e536f5d4d42ed669c5ee
2018-10-15 08:03:52 -07:00
Android Build Merger (Role)
b80a28b66d Merge changes into stage-aosp-master 2018-10-15 15:00:04 +00:00