Commit Graph

5377 Commits

Author SHA1 Message Date
Etan Cohen
be97184c39 Merge "[CM] Fix comments, add tests to TransportInfo API"
am: 4060bc1480

Change-Id: Idd668efdd1fe65754228041f23f3a91148aa38d6
2018-12-11 21:54:25 -08:00
Etan Cohen
55191eb12e [CM] Fix comments, add tests to TransportInfo API
Bug: 117605977
Test: atest NetworkCapabilitiesTest
Change-Id: I734ec56e44cd09d11ae81a856a53a26e1191b9a0
2018-12-11 15:00:10 -08:00
TreeHugger Robot
1a302ebcc8 Merge "DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into stage-aosp-master" into stage-aosp-master 2018-12-11 21:49:22 +00:00
Junyu Lai
3b3ed972b7 Merge "VPN: Move package intent receiver to ConnectivityService."
am: aff267369c

Change-Id: I3220f34afe7e56bcbde87a8de2b00ecddecbc97a
2018-12-11 03:36:18 -08:00
junyulai
47311631d8 VPN: Move package intent receiver to ConnectivityService.
Currently, PermissionMonitor listen to user add/remove and
package add/remove intent respectively, and so does VPN.
Thus, races might occurr between them.

This commit refactor VPN part by using ConnectivityService to
listen to intents and dispatch events to VPN.

Bug: 118811303
Test: 1. atest FrameworksNetTests
      2. manually add/remove package
      3. cts-tradefed run cts -m CtsHostsideNetworkTests

Change-Id: Id76fd77c5fcfb2b0e21f211f63f007b1ea1aa53f
2018-12-11 14:04:02 +08:00
Xin Li
9416b2b2ae DO NOT MERGE - Merge pie-platform-release (PPRL.181205.001) into stage-aosp-master
Bug: 120502534
Change-Id: I7351a1832c4bd2fd86324183ab83e9088d716822
2018-12-10 12:30:19 -08:00
Junyu Lai
ed44d94dc1 Merge "Refactoring of deleting stats in NetworkStats based on uids."
am: 62724276e6

Change-Id: I60b086861a9a91cdd54c56c7caf21d26a6dd294a
2018-12-09 21:38:59 -08:00
Junyu Lai
62724276e6 Merge "Refactoring of deleting stats in NetworkStats based on uids." 2018-12-10 05:15:28 +00:00
Etan Cohen
e95b6a7ebc Merge "[CS] Add a generic transport-specific information API"
am: 9d38e58d60

Change-Id: Ibd5c44ff35a9002f2eafe0f0f131dbdb609f50a9
2018-12-08 20:09:11 -08:00
Etan Cohen
9d38e58d60 Merge "[CS] Add a generic transport-specific information API" 2018-12-09 03:53:44 +00:00
Etan Cohen
d397de2e39 [CS] Add a generic transport-specific information API
Add a generic transport-specific information container interface and
access methods. These can be used by a network factory to pass transport
(bearer)-specific network parameters to the app.

Bug: 117605977
Test: atest frameworks/base/tests/net/java/android/net (+new unit tests)
Change-Id: Ib7c83b677e1c02a2212265719813e648b0c9cc1b
2018-12-07 17:37:48 +00:00
Chenbo Feng
2d64d2096d Merge "Call netd to update the tcp buffer size"
am: 275ccbcc06

Change-Id: I217b1cc4afd886b449e532a7bde26bc9a5167277
2018-12-06 11:16:18 -08:00
Treehugger Robot
275ccbcc06 Merge "Call netd to update the tcp buffer size" 2018-12-06 19:01:24 +00:00
junyulai
85c0fd7969 Refactoring of deleting stats in NetworkStats based on uids.
In follow-up commits, current API would create new NetworkStats
every time when 464xlatAdjustment wants to filtered out some
uids.

This commit refactors it to delete stats in-place to get better
performance.

Bug: 118602783
Test: atest FrameworksNetTests
Change-Id: I858f95d1fa7733111786243b4e261ce8a70a068d
2018-12-06 19:01:17 +09:00
Luke Huang
c8c22abba1 Merge "Use ParcelFileDescriptor instead of FileDescriptor in INetd.aidl"
am: c141de0b7e

Change-Id: I87360c19d58de38772f95ba8123a559007c6e71d
2018-12-04 22:21:26 -08:00
Luke Huang
c141de0b7e Merge "Use ParcelFileDescriptor instead of FileDescriptor in INetd.aidl" 2018-12-05 05:55:49 +00:00
Lucas Lin
b33add21de Merge "Simpify logic in updateTcpBufferSizes"
am: 08d5bca515

Change-Id: Ia95fd298cdea4b47cc9842b63f11282de58d18f7
2018-11-29 00:55:52 -08:00
Bill Yi
fade057e55 Merge pi-qpr1-release PQ1A.181105.017.A1 to pi-platform-release
Change-Id: Id08fdcae21e3ceb54e893a9ed11da6e67c889895
2018-11-28 18:45:59 -08:00
lucaslin
589964bdb5 Simpify logic in updateTcpBufferSizes
updateTcpBufferSizes() only need tcp buffer size as its
parameter. Also unify the logic to check default network
outside the function.

Bug: 120119769
Test: 1. Build pass.
      2. runtest frameworks-net

Change-Id: Iee9fec3efe7d5be5b590dd1c1f67ec5de636e613
2018-11-29 01:35:54 +00:00
Lucas Lin
1ffa04c9e2 Merge "Update LinkProperties to NetworkAgentInfo only when it's changed"
am: 023c12cf58

Change-Id: I681eaea9dfccaef5c0f003c2cef7721539f7328c
2018-11-28 02:22:50 -08:00
Lucas Lin
023c12cf58 Merge "Update LinkProperties to NetworkAgentInfo only when it's changed" 2018-11-28 09:57:48 +00:00
lucaslin
34cd39435a Update LinkProperties to NetworkAgentInfo only when it's changed
In previous design, it will always assign newLp to nai in
handleUpdateLinkProperties(). And Private dns configuration
will be missing when the same LinkProperties are updated
because the updated LinkProperties is not assigned back to
NetworkAgentInfo.

Bug: 118518971
Test: 1.Build pass.
      2.runtest frameworks-net

Change-Id: I405c8f29497fec438082a2cf30eb5c7b9497e1c4
2018-11-28 06:16:38 +00:00
Luke Huang
10786db8bb Use ParcelFileDescriptor instead of FileDescriptor in INetd.aidl
Stable aidl won't support FileDescriptor but ParcelFileDescriptor.
In order to migrate to stable aidl, replace all FileDescriptor in
INdetd.aidl.

Test: runtest frameworks-net passes
Change-Id: Icdf37aed0e0cce0352070a437066e77c0f2fd85a
2018-11-28 13:41:58 +08:00
Chiachang Wang
29429e97eb Merge "Data stall detection using DNS event"
am: 6db57bece3

Change-Id: I4b5248e97028bf8e9e837ff5ccf8e0d3138f7b05
2018-11-27 20:09:03 -08:00
Chiachang Wang
6db57bece3 Merge "Data stall detection using DNS event" 2018-11-28 03:53:30 +00:00
Chenbo Feng
3d9b490bde Call netd to update the tcp buffer size
The system server is controlling the tcp buffer now by writing to
/sys/kernel/ipv4/tcp_{rmem,wmem}_{min,def,max}. Those files are
basically the same as /proc/sys/net/ipv4/tcp_{rmem,wmem} except those
latter ones contain all three values in one file. Netd can directly write
to those files so we no longer need to depend on these android specific
files.

Test: netd_integration_test
Bug: 118572798
Change-Id: I588b48be29ecf61fd5bbf94f97f63738be4eae25
2018-11-27 15:37:52 -08:00
Chiachang Wang
ea46de7b2a Data stall detection using DNS event
If dns resolver on a network get consecutively timeout then it
is a strong signal that the network is no longer usable.
Reevaluate the network once it's data stall suspected

Test: 1. runtest frameworks-net
      2. SettingsBackupTest passes
      2. Run on wifi w/o internet capability
Bug: 112653893, 113916551

Change-Id: I74287b174d933f97a91fa1529b1809856ac3b38d
2018-11-27 18:00:05 +08:00
Junyu Lai
505c8d0fce Merge "PermissionMonitor: Move intent receiver to ConnectivityService."
am: 28d4fcdc12

Change-Id: I1038abba55ba5492dd8958c365500714b0e8ffd8
2018-11-26 18:07:33 -08:00
Junyu Lai
28d4fcdc12 Merge "PermissionMonitor: Move intent receiver to ConnectivityService." 2018-11-27 01:48:59 +00:00
Benedict Wong
c9884dcec9 Merge changes from topic "xfrmi-support"
am: f928c1e4b9

Change-Id: I9b76a58ab9ebdb9abb01216e8b3916f1f52f9267
2018-11-25 19:15:37 -08:00
Benedict Wong
29ec3e93cd Add XFRM-I support to IpSecService
This change adds support for XFRM-I to all IpSecService netd calls.
Fallback logic is in netd, and thus both VTI and XFRM-I parameters are
always passed down to IpSecService.

Bug: 78589502
Test: All java, CTS tests passing
Change-Id: Ie4186f0ad7e50763b21831f6fa411b5ee436de78
2018-11-21 08:34:54 -08:00
junyulai
8adb5bd967 PermissionMonitor: Move intent receiver to ConnectivityService.
Currently, PermissionMonitor listen to user add/remove and
package add/remove intent respectively, and so does VPN.
Thus, races might occurr between them.

This commit refactor PermissionMonitor part by using
ConnectivityService to listen to intents and dispatch events
to PermissionMonitor.

Bug: 118811303
Test: 1. atest FrameworksNetTests
      2. manually add/remove package

Change-Id: I6e45b5870d5b1300cad252d25bdb4da78f9bf70e
2018-11-21 12:17:10 +09:00
Jack Yu
eaea5d929e Merge "Move hidden APIs into system APIs"
am: 01a8c6214e

Change-Id: Ic35d305ce0a7e6d0472bfe76ee00034abdd918c5
2018-11-20 18:56:13 -08:00
Jack Yu
01a8c6214e Merge "Move hidden APIs into system APIs" 2018-11-21 02:40:30 +00:00
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
Jack Yu
13fefdd2f9 Move hidden APIs into system APIs
To allow vendor code to construct LinkAddress, which is
one of the parameter in the system API DataCallResponse.

Test: Build
Bug: 73659459
Merged-In: I3e203781d3a03285fa0e047cc8837ccb4a09016a
Change-Id: I3e203781d3a03285fa0e047cc8837ccb4a09016a
2018-11-19 14:40:13 -08: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