Commit graph android_packages_modules_Co.../tests/net/java
Message SHA1
Merge "Properly expect all callbacks in testStackedLinkProperties." am: 4129d435c1 am: 6d8a63cf80
am: 6fb16a0ef0

Change-Id: I615f412f7696752d867337ab5cbabe24daea2ed3

Lorenzo Colitti   authored and   android-build-merger   commited 2019-01-21 23:00:00 -08:00
4782b60702
Properly expect all callbacks in testStackedLinkProperties.
Currently testStackedLinkProperties accounts for some of the
NetworkCallbacks that are fired, but not all of them. The test
passes because it only ever expects LinkProperties changed
callbacks (and not, e.g., lost callbacks), because it uses
waitForIdle(), and because at the end, when the callback is
unregistered, it does not call assertNoCallback().

Add the missing callback expectation and expect a LOST callback
at the end. Also add an assertNoCallback, even though it's not
strictly necessary. Remove all the waitForIdle statements, which
are no longer necessary because every assertion happens after
waiting for a callback.

Making the expectations more precise in a separate CL will help
ensure that upcoming changes to this code don't break anything,
and will make said changes easier to review.

Bug: 65674744
Test: atest FrameworksNetTests
Test: ConnectivityServiceTest#testStackedLinkProperties passes 400 times
Change-Id: I73cda0dd029a0e6546f7272beedf841ce5a4c0dc

Lorenzo Colitti   commited 2019-01-22 10:53:00 +09:00
46eae8a765
Merge changes I2ddfef0c,I49bee0c9 am: ba4d5be35a am: 11c58491ff
am: c8a38238fe

Change-Id: I369bf5d92a3f70e789043d33bcbc85099aebbb69

Chalard Jean   authored and   android-build-merger   commited 2019-01-21 11:28:55 -08:00
467d8f991e
[MS08] Read back attributes and blobs.
Test: New tests in IpMemoryStore
Bug: 113554482

Change-Id: I2ddfef0c2ed37459c038f75d1dfc92fdefbf58f5

Chalard Jean   commited 2019-01-21 15:21:09 +09:00
d92c3d5c95
Merge "Avoid calling ParcelFileDescriptor.fromSocket on new Sockets." am: 79a632905b am: 49ccab2d41
am: 97e14189cd

Change-Id: I34e6480f42957da27aeb6f8ccc6bd91d2304e590

Josh Gao   authored and   android-build-merger   commited 2019-01-18 15:57:06 -08:00
a70dcfb253
Merge "Avoid calling ParcelFileDescriptor.fromSocket on new Sockets."
Josh Gao   authored and   Gerrit Code Review   commited 2019-01-18 22:25:35 +00:00
79a632905b
Merge "[CS] Add an option to block sensitive network specifier" am: 895ef965f5 am: 9e15373de2
am: 8452d2156d

Change-Id: I17fba0e9c0314b32597ccdc1ac6de61ca796e9b8

Etan Cohen   authored and   android-build-merger   commited 2019-01-17 21:33:27 -08:00
d185ac24e1
[CS] Add an option to block sensitive network specifier
Network specifiers are used for 2 purposes:

- As part of network requests to specify more information on the type
  of requested networks.
- On network agents to specify information about their networks.

The network specifiers of the requests and agents are matched to each
other. However, the agent network specifier may contain sensitive
information which we do not want forwarded to any app.

This CL adds an option to strip out this agent network specifier before
the network capabilities are forwarded to the app.

Bug: 122160111
Test: atest ConnectivityServiceTest (frameworks/base/tests/net)
Test: atest frameworks/base/tests/net
Test: atest frameworks/opt/net/wifi/tests/wifitests
Test: atest frameworks/opt/telephony/tests/telephonytests
Test: atest frameworks/opt/net/ethernet/tests
Test: atest android.net.cts - some flakiness!
Test: act.py ThroughputTest
Test: act.py DataPathTest
Test: atest SingleDeviceTest (cts)
Change-Id: If08d312ff814bdde1147518f923199e6349503d5

Etan Cohen   commited 2019-01-17 16:30:05 -08:00
c069b066d3
Merge changes Iec53a9fd,Iac4cfe70 am: ab07d23ac3 am: 0032ba7e00
am: 21bf610980

Change-Id: Ie225d000aeafb4a0b1e3910967c619fd932f239f

Lorenzo Colitti   authored and   android-build-merger   commited 2019-01-16 02:03:06 -08:00
9479913c34
Merge "Add the NAT64 prefix to LinkProperties." am: 983e77db4a am: 64b4c729b9
am: 2a7ddd7017

Change-Id: I53948d2c3f50b9973e5b9483cf172b5932028f51

Lorenzo Colitti   authored and   android-build-merger   commited 2019-01-14 20:40:25 -08:00
37ac0647b1
Test parceling empty LinkProperties.
Test: atest FrameworksNetTests
Change-Id: Iec53a9fdce1ba1db86751ea5f14a11d28be543eb

Lorenzo Colitti   commited 2019-01-15 12:53:59 +09:00
1098cc6470
Delete the clatd functions from NetworkManagementService.
Make Nat464Xlat talk to netd directly instead of through
NetworkManagementService. The methods in NetworkmanagementService
don't really provide any value: since the only thing they do is
call into netd, we might as well have the callers talk to netd
directly,

In order to do this, pass INetworkManagementService and INetd to
the NetworkAgentInfo constructor, and update callers appropriately.

Bug: 65674744
Test: builds, boots
Test: atest FrameworksNetTests
Change-Id: Iac4cfe709c6279e4d9682b6754963e533707bd12

Lorenzo Colitti   commited 2019-01-15 11:13:07 +09:00
c9ac786a08
Add the NAT64 prefix to LinkProperties.
Currently we support exactly one NAT64 prefix. This matches what
other components in the system (Dns64Configuration, clatd, etc.)
support.

Test: atest FrameworksNetTests
Change-Id: I45a11cebe43a5e1c60d50eca7889cb317565b598

Lorenzo Colitti   commited 2019-01-12 02:16:34 +09:00
3d680287a3
Merge changes from topic "IPMS1" am: 3627deac88 am: 6659e77d0f
am: 4e9b83ed6d

Change-Id: I6908f68b1b9e7079384c4cc9f11c4e46cce694ce

Chalard Jean   authored and   android-build-merger   commited 2019-01-11 04:13:38 -08:00
8461424c04
[MS02] Write the skeleton for the IP memory store.
This implements a minimal contract for the IP Memory Store
feature.

Test: Created new tests for parcelable code. For the rest, created
      empty tests, but there is no logic, it's boilerplate day
Bug: 116512211
Change-Id: I15dc6275b370d671385ddfdb058a8b8d39952d6e

Chalard Jean   commited 2019-01-11 15:01:00 +09:00
709d367b80
[MS01] Add the IP memory store service.
Bug: 116512211
Test: Added initial tests
Change-Id: I9d9af4097e3e2d7afd9956b9cbfa29a9f9558ae0

Chalard Jean   commited 2019-01-11 15:00:36 +09:00
7c2ee0d699
Merge "Move NetworkMonitor to NetworkStack" am: 197460b8d5 am: 6cd05b8739
am: 77a7561f5d

Change-Id: Ia5d742bd5186e92b8a45bb72fb414b9dbdd38f78

Remi NGUYEN VAN   authored and   android-build-merger   commited 2019-01-10 21:39:06 -08:00
ae7835c4c6
Merge "Move NetworkMonitor to NetworkStack"
Remi NGUYEN VAN   authored and   Gerrit Code Review   commited 2019-01-11 05:08:52 +00:00
197460b8d5
Move NetworkMonitor to NetworkStack
Bug: b/112869080
Test: atest FrameworksNetTests NetworkStackTests
Change-Id: I1b8b6a3f4390adbabf92fb9e48da61c47b08b2ec

Remi NGUYEN VAN   commited 2019-01-11 09:59:11 +09:00
1becbe7015
Merge "Add PCSCF to LinkProperties." am: 2bcdb1acfa am: 736e813e38
am: 769062d78d

Change-Id: I16eedc51ad4932b7ec6a32d9e718c48cf203c2f0

Chalard Jean   authored and   android-build-merger   commited 2019-01-09 22:29:15 -08:00
58b50492c8
Merge "Add PCSCF to LinkProperties."
Chalard Jean   authored and   Gerrit Code Review   commited 2019-01-10 05:55:05 +00:00
2bcdb1acfa
Merge "Ignore ipv6 tx traffic on clat uid." am: c8497bb4f6 am: aa94986931
am: d7c950a284

Change-Id: I1ac85ac863026ea99117c5b0115bcc0c9144fb7b

Junyu Lai   authored and   android-build-merger   commited 2019-01-04 08:47:41 -08:00
a2b45dae50
Merge "Ignore ipv6 tx traffic on clat uid."
Junyu Lai   authored and   Gerrit Code Review   commited 2019-01-04 09:29:10 +00:00
c8497bb4f6
Merge "[CM] Fix comments, add tests to TransportInfo API" am: 4060bc1480 am: be97184c39
am: e907da9b5a

Change-Id: I0a81b7b48bb02da202dd7feaa1440801b794ce67

Etan Cohen   authored and   android-build-merger   commited 2018-12-11 22:22:36 -08:00
67f7fa7dfa
[CM] Fix comments, add tests to TransportInfo API
Bug: 117605977
Test: atest NetworkCapabilitiesTest
Change-Id: I734ec56e44cd09d11ae81a856a53a26e1191b9a0

Etan Cohen   commited 2018-12-11 15:00:10 -08:00
55191eb12e
Merge "Refactoring of deleting stats in NetworkStats based on uids." am: 62724276e6 am: ed44d94dc1
am: 93f143fd89

Change-Id: I29c57276424464afd54e184c369d30a5e9707f14

Junyu Lai   authored and   android-build-merger   commited 2018-12-10 03:10:15 -08:00
a9d95122a6
Merge "[CS] Add a generic transport-specific information API" am: 9d38e58d60 am: e95b6a7ebc
am: b70ca9b938

Change-Id: I47e0a7d62434b05d4692f9835af93c3a5dd61027

Etan Cohen   authored and   android-build-merger   commited 2018-12-10 02:39:46 -08:00
8c6670ab58
Ignore ipv6 tx traffic on clat uid.
Currently, 464xlat counts its ipv6 tx traffic into root uid.
When user is making ipv4 upload over ipv6-only network, ipv4
tx traffic may sometimes be counted faster then ipv6 tx
traffic.

Thus, NetworkStatsService may detect non-monotonic values due
to 464xlat adjustment.

So the solution is that: for clatd, make ipv6 tx traffic counts
into clat uid, and then ignore it in the framework side.

Bug: 118602783
Test: 1. manually verify clatd traffic on clat uid.
      2. runtest frameworks-net

Change-Id: Ifb478b79e3e281918c70e16d1f90682c78f33db1

junyulai   commited 2018-12-10 15:19:03 +08:00
7f1d54969a
Merge "Refactoring of deleting stats in NetworkStats based on uids."
Junyu Lai   authored and   Gerrit Code Review   commited 2018-12-10 05:15:28 +00:00
62724276e6
Merge "[CS] Add a generic transport-specific information API"
Etan Cohen   authored and   Gerrit Code Review   commited 2018-12-09 03:53:44 +00:00
9d38e58d60
[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

Etan Cohen   commited 2018-12-07 17:37:48 +00:00
d397de2e39
Merge "Call netd to update the tcp buffer size" am: 275ccbcc06 am: 2d64d2096d
am: f7e888fae8

Change-Id: I9df7c3d6b1d613e8c9a7b7a2bd0da05c2e17a291

Chenbo Feng   authored and   android-build-merger   commited 2018-12-06 11:53:39 -08:00
f76c615f8f
Merge "Call netd to update the tcp buffer size"
Treehugger Robot   authored and   Gerrit Code Review   commited 2018-12-06 19:01:24 +00:00
275ccbcc06
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

junyulai   commited 2018-12-06 19:01:17 +09:00
85c0fd7969
Add PCSCF to LinkProperties.
Some applications or services are needed PCSCF address to register IMS server but there is no way to get it on Android Framework.
We have added PCSCF address to LinkProperties like attached diff files.

Test: get Linkproperties and check Pcscf addresses.
      atest FrameworksNetTests

Change-Id: Ic2341a4ce2ed88d560325721766fc21f85f7ff86
Signed-off-by: Hongshik <hshik.kim@samsung.com>

Hongshik   commited 2018-12-05 22:05:49 +09:00
541810a610
Merge "Use ParcelFileDescriptor instead of FileDescriptor in INetd.aidl" am: c141de0b7e am: c8c22abba1
am: 55caa3ba30

Change-Id: I1dd010a0b4ec54c87b509c1e05185164fde9e4cb

Luke Huang   authored and   android-build-merger   commited 2018-12-04 22:44:36 -08:00
fe21a7a1cd
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

Luke Huang   commited 2018-11-28 13:41:58 +08:00
10786db8bb
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

Chenbo Feng   commited 2018-11-27 15:37:52 -08:00
3d9b490bde
Merge "PermissionMonitor: Move intent receiver to ConnectivityService." am: 28d4fcdc12 am: 505c8d0fce
am: d888ad86b7

Change-Id: I7b23a8a6e2a636998adc7b279a848b0c0e86baf4

Junyu Lai   authored and   android-build-merger   commited 2018-11-26 19:02:19 -08:00
8b22777e47
Merge "PermissionMonitor: Move intent receiver to ConnectivityService."
Junyu Lai   authored and   Gerrit Code Review   commited 2018-11-27 01:48:59 +00:00
28d4fcdc12
Merge changes from topic "xfrmi-support" am: f928c1e4b9 am: c9884dcec9
am: b33ffcad4b

Change-Id: I9c543d38c88181b12cdbc7bdb93d7e38f1dfd425

Benedict Wong   authored and   android-build-merger   commited 2018-11-25 19:38:35 -08:00
9983a76882
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

Benedict Wong   commited 2018-11-21 08:34:54 -08:00
29ec3e93cd
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

junyulai   commited 2018-11-21 12:17:10 +09:00
8adb5bd967
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
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
Change-Id: I80b683e69da6beff3b37fc345fc15aa9610d09b7

Etan Cohen   commited 2018-11-16 14:00:22 -08:00
7f6046dade
Merge "Use spy in PermissionMonitorTest." am: c5a03a68d9 am: 1f24248aa7
am: 5519795666

Change-Id: I1478b9c2bb12b6bfd161be99c5faa7aec76d9a7f

Junyu Lai   authored and   android-build-merger   commited 2018-11-09 14:16:41 -08:00
4d7af8bdec
Avoid calling ParcelFileDescriptor.fromSocket on new Sockets.
Previously, we were calling ParcelFileDescriptor.fromSocket on a newly
initialized Socket, which doesn't actually create a file descriptor
until the Socket is bound or connected.

Bind the Socket to a random port to force the file descriptor to be
allocated.

Test: treehugger
Change-Id: Id92a3e1316881d1c5382485aa2d6a41fc37e9651

Josh Gao   commited 2018-11-09 14:10:40 -08:00
b56a1ddbb4
Merge "Use spy in PermissionMonitorTest."
Junyu Lai   authored and   Gerrit Code Review   commited 2018-11-09 08:47:03 +00:00
c5a03a68d9
Use spy in PermissionMonitorTest.
Bug: 118811303
Test: runtest frameworks-net
Change-Id: Id61a9efecf1d1ed5a9045b78ecfec9239e13967b

junyulai   commited 2018-11-09 12:37:16 +08:00
2c54072845
Merge "Add skip464xlat test in Nat464XlatTest" am: aef8fe0d47 am: 0b6a961580
am: d19ffbadd2

Change-Id: I9d59f05ee0d73c5df8351de1332ee0a5924ae8e8

soma, kawata   authored and   android-build-merger   commited 2018-11-08 05:26:30 -08:00
262458429e