Commit Graph

9930 Commits

Author SHA1 Message Date
Lorenzo Colitti
dadfeed5c5 [automerger skipped] Merge "Support learning the NAT64 prefix from two different sources." into rvc-dev am: 4f7f6d67e9 -s ours am: b2a05e3c42 -s ours am: 87a848e31b -s ours
am skip reason: Change-Id Ic7452431d2d9aea1ae59b67a9d8383c6cc5b3902 with SHA-1 e2eade021a is in history

Change-Id: I075ba95c969ded0d3d35abc861802f584f86de61
2020-04-20 14:12:33 +00:00
Lorenzo Colitti
87a848e31b [automerger skipped] Merge "Support learning the NAT64 prefix from two different sources." into rvc-dev am: 4f7f6d67e9 -s ours am: b2a05e3c42 -s ours
am skip reason: Change-Id Ic7452431d2d9aea1ae59b67a9d8383c6cc5b3902 with SHA-1 e2eade021a is in history

Change-Id: Id0c91aa087b90efc608f63f7ce0f133c0d7a59de
2020-04-20 14:04:25 +00:00
Lorenzo Colitti
b2a05e3c42 [automerger skipped] Merge "Support learning the NAT64 prefix from two different sources." into rvc-dev am: 4f7f6d67e9 -s ours
am skip reason: Change-Id Ic7452431d2d9aea1ae59b67a9d8383c6cc5b3902 with SHA-1 e2eade021a is in history

Change-Id: I6724e192ae3ad62fd44ead33369f76c9d7709525
2020-04-20 13:56:13 +00:00
Lorenzo Colitti
0682f9f20e Merge "Stop prefix discovery if an RA prefix arrives in DISCOVERING" am: c44ca579ad am: d0359ea573 am: 6bb660e9f4 am: 3021d82b60
Change-Id: I56d953505630d71ce0aff1e60e9b0beb66035aa7
2020-04-20 11:56:08 +00:00
Lorenzo Colitti
ac4f8a94eb Merge "Make the Nat464Xlat tests more realistic." am: 6ce7a2aeee am: 3da6384b41 am: 9a8f4c8067 am: 0a03ff9f20
Change-Id: I861783880579685ea21dc96c388c361527f74097
2020-04-20 11:55:49 +00:00
Lorenzo Colitti
11c9dfb263 Merge "Support learning the NAT64 prefix from two different sources." am: 204b31920f am: a00f03dd61 am: 27bb67c35b am: 9b28d3278d
Change-Id: Ifbbd066d0c990b92d9030ab79287243d4aed3d11
2020-04-20 11:55:24 +00:00
Lorenzo Colitti
4308bfc4f0 Support learning the NAT64 prefix from two different sources.
The NAT64 prefix from the RA always takes precedence over the
NAT64 prefix from DNS discovery, because it is detected faster,
and detecting it does not require sending any packets.

Bug: 150648313
Test: new unit test
Merged-In: Ic7452431d2d9aea1ae59b67a9d8383c6cc5b3902
Change-Id: Ic7452431d2d9aea1ae59b67a9d8383c6cc5b3902
2020-04-20 11:53:00 +00:00
Lorenzo Colitti
3021d82b60 Merge "Stop prefix discovery if an RA prefix arrives in DISCOVERING" am: c44ca579ad am: d0359ea573 am: 6bb660e9f4
Change-Id: I896d49e23b8e7eadb29c930a295655cff5e92349
2020-04-20 11:48:18 +00:00
Lorenzo Colitti
0a03ff9f20 Merge "Make the Nat464Xlat tests more realistic." am: 6ce7a2aeee am: 3da6384b41 am: 9a8f4c8067
Change-Id: I31aa59d82248cbb1d2b4f51c6db0ca92e9798143
2020-04-20 11:38:14 +00:00
Lorenzo Colitti
6bb660e9f4 Merge "Stop prefix discovery if an RA prefix arrives in DISCOVERING" am: c44ca579ad am: d0359ea573
Change-Id: If6dd56d2860611586af3c434af3ddc4b6df76ab3
2020-04-20 11:38:11 +00:00
Lorenzo Colitti
9b28d3278d Merge "Support learning the NAT64 prefix from two different sources." am: 204b31920f am: a00f03dd61 am: 27bb67c35b
Change-Id: I455df243a74d9e807e20d3aeada2bc90b565bce3
2020-04-20 11:37:55 +00:00
Lorenzo Colitti
9a8f4c8067 Merge "Make the Nat464Xlat tests more realistic." am: 6ce7a2aeee am: 3da6384b41
Change-Id: Ib8d91c81af3d2e5d03c0fd47f415ff93fee5e2aa
2020-04-20 11:37:54 +00:00
Lorenzo Colitti
27bb67c35b Merge "Support learning the NAT64 prefix from two different sources." am: 204b31920f am: a00f03dd61
Change-Id: I0c7e48c0b16fe09269ced98712bd636105f46a5c
2020-04-20 11:37:18 +00:00
Lorenzo Colitti
d0359ea573 Merge "Stop prefix discovery if an RA prefix arrives in DISCOVERING" am: c44ca579ad
Change-Id: Ia51addeb9d1f954a396764ec049213ac216b7c1f
2020-04-20 11:21:47 +00:00
Lorenzo Colitti
3da6384b41 Merge "Make the Nat464Xlat tests more realistic." am: 6ce7a2aeee
Change-Id: I6a611b7fd7199d8c91baca39e04749ad8852a42e
2020-04-20 11:21:17 +00:00
Lorenzo Colitti
a00f03dd61 Merge "Support learning the NAT64 prefix from two different sources." am: 204b31920f
Change-Id: I8778773dab5f46aec6bf18c83d9766687307ca25
2020-04-20 11:20:58 +00:00
Lorenzo Colitti
c44ca579ad Merge "Stop prefix discovery if an RA prefix arrives in DISCOVERING" 2020-04-20 11:10:31 +00:00
Lorenzo Colitti
6ce7a2aeee Merge "Make the Nat464Xlat tests more realistic." 2020-04-20 11:06:08 +00:00
Lorenzo Colitti
204b31920f Merge "Support learning the NAT64 prefix from two different sources." 2020-04-20 11:05:52 +00:00
Lorenzo Colitti
38c6519a90 Stop prefix discovery if an RA prefix arrives in DISCOVERING
Currently, if a prefix is learned from an RA while prefix
discovery is running, clatd will be correctly started, but
prefix discovery will be stopped.

In order to fix this, make it possible to call
stopPrefixDiscovery without transitioning to IDLE state (which
is obviously necessary in this case), by moving the assignment of
the next state from that method to its callers. For consistency,
do the same for startPrefixDiscovery.

Bug: 150648313
Test: new test coverage
Change-Id: I3803fa3d9806848b331c35ee8bac256934bd1f21
2020-04-20 17:54:20 +09:00
Lorenzo Colitti
c6bd5847c9 Make the Nat464Xlat tests more realistic.
464xlat will never be started on a network that is not connected,
or on a network that has no IPv6 address.

This is a no-op test-only change but it is necessary for an
upcoming change that violates some of the invalid assumptions
currently made by this test and causes it to fail.

Bug: 150648313
Test: test-only change
Change-Id: I41766e9adaa7c24454648b371e6e3cc647693be5
2020-04-20 17:54:20 +09:00
Aaron Huang
e1f56d6957 Merge "Add network agent to enhance NetworkProvider test" am: 147d253956 am: 15a2eae782 am: 4d894c7e58 am: 97d69be928
Change-Id: I6514b43f01dc7796aa2199736148f93cab524413
2020-04-20 08:47:57 +00:00
Aaron Huang
97d69be928 Merge "Add network agent to enhance NetworkProvider test" am: 147d253956 am: 15a2eae782 am: 4d894c7e58
Change-Id: Ieea40ecca466155a6044ac93544ed6fc5531ef1f
2020-04-20 08:30:29 +00:00
Aaron Huang
4d894c7e58 Merge "Add network agent to enhance NetworkProvider test" am: 147d253956 am: 15a2eae782
Change-Id: I295d001e7b195c523b18b667825a84bb5e862248
2020-04-20 08:11:44 +00:00
Lorenzo Colitti
e2eade021a Support learning the NAT64 prefix from two different sources.
The NAT64 prefix from the RA always takes precedence over the
NAT64 prefix from DNS discovery, because it is detected faster,
and detecting it does not require sending any packets.

Bug: 150648313
Test: new unit test
Change-Id: Ic7452431d2d9aea1ae59b67a9d8383c6cc5b3902
2020-04-20 16:50:53 +09:00
Aaron Huang
15a2eae782 Merge "Add network agent to enhance NetworkProvider test" am: 147d253956
Change-Id: Ib1b65aec6398f4e6a1cc2e14ec86d669be88ab74
2020-04-20 07:41:36 +00:00
Aaron Huang
147d253956 Merge "Add network agent to enhance NetworkProvider test" 2020-04-20 07:20:25 +00:00
Aaron Huang
3fb34aad08 Merge "Move DhcpInfoTest to frameworks/base/tests/net/common" am: e66ba51271 am: 54e05b5d08 am: 07cc052975 am: 9e5cd58c3f
Change-Id: Ibbd62e45a885295c8f369d689369b8537acfefd4
2020-04-17 16:04:59 +00:00
Aaron Huang
9e5cd58c3f Merge "Move DhcpInfoTest to frameworks/base/tests/net/common" am: e66ba51271 am: 54e05b5d08 am: 07cc052975
Change-Id: I335f03257eb3a0b63c6b35527ff5964d677a8c40
2020-04-17 15:40:16 +00:00
Aaron Huang
07cc052975 Merge "Move DhcpInfoTest to frameworks/base/tests/net/common" am: e66ba51271 am: 54e05b5d08
Change-Id: I7fb30591e0e380f3cf75417bb1d39c81baaaa3f0
2020-04-17 15:18:31 +00:00
Aaron Huang
54e05b5d08 Merge "Move DhcpInfoTest to frameworks/base/tests/net/common" am: e66ba51271
Change-Id: I7179f2e312d1e8237b211cb60eee5c08cd759197
2020-04-17 14:54:34 +00:00
Aaron Huang
41c2bc2828 [automerger skipped] Merge "This contains a squash of two changes >>>>>>>>>>>>>>>>>>>>>> aosp/1284588 Adjust permission of NetworkProvider related API" into rvc-dev am: 78ab633b8f -s ours am: 3472973acb -s ours am: 7be2e820cc -s ours
am skip reason: Change-Id Ic9809e731aa811a51c2f82d189372169d99a5ed9 with SHA-1 ebbfd3ccb9 is in history

Change-Id: I1f77475f367149c1a3929dcf6bc711af9ebbd5d6
2020-04-17 11:33:47 +00:00
Aaron Huang
77eb36a3ac [automerger skipped] Merge "This contains a squash of two changes >>>>>>>>>>>>>>>>>>>>>> aosp/1284588 Adjust permission of NetworkProvider related API" into rvc-dev am: 78ab633b8f am: a01c48d651 -s ours am: a2800920ad -s ours
am skip reason: Change-Id Ic9809e731aa811a51c2f82d189372169d99a5ed9 with SHA-1 ebbfd3ccb9 is in history

Change-Id: I1e0fc62e5bdda397a3db9ba8be0dcc4cae504457
2020-04-17 11:33:10 +00:00
Aaron Huang
7be2e820cc [automerger skipped] Merge "This contains a squash of two changes >>>>>>>>>>>>>>>>>>>>>> aosp/1284588 Adjust permission of NetworkProvider related API" into rvc-dev am: 78ab633b8f -s ours am: 3472973acb -s ours
am skip reason: Change-Id Ic9809e731aa811a51c2f82d189372169d99a5ed9 with SHA-1 ebbfd3ccb9 is in history

Change-Id: Iec99573d8584492622e1caf85b9879ec63dada8b
2020-04-17 11:17:21 +00:00
Aaron Huang
a2800920ad [automerger skipped] Merge "This contains a squash of two changes >>>>>>>>>>>>>>>>>>>>>> aosp/1284588 Adjust permission of NetworkProvider related API" into rvc-dev am: 78ab633b8f am: a01c48d651 -s ours
am skip reason: Change-Id Ic9809e731aa811a51c2f82d189372169d99a5ed9 with SHA-1 ebbfd3ccb9 is in history

Change-Id: I00a29862733b57decf62241abdc7582cacd156e6
2020-04-17 11:17:00 +00:00
Aaron Huang
3472973acb [automerger skipped] Merge "This contains a squash of two changes >>>>>>>>>>>>>>>>>>>>>> aosp/1284588 Adjust permission of NetworkProvider related API" into rvc-dev am: 78ab633b8f -s ours
am skip reason: Change-Id Ic9809e731aa811a51c2f82d189372169d99a5ed9 with SHA-1 ebbfd3ccb9 is in history

Change-Id: I581e84d6c3e77d294089c4eccc464073191f341a
2020-04-17 11:01:43 +00:00
Aaron Huang
a01c48d651 Merge "This contains a squash of two changes >>>>>>>>>>>>>>>>>>>>>> aosp/1284588 Adjust permission of NetworkProvider related API" into rvc-dev am: 78ab633b8f
Change-Id: I2584b86082f224c6fdaa7e4ecc0aac52a92c3427
2020-04-17 11:01:29 +00:00
Aaron Huang
78ab633b8f Merge "This contains a squash of two changes >>>>>>>>>>>>>>>>>>>>>> aosp/1284588 Adjust permission of NetworkProvider related API" into rvc-dev 2020-04-17 10:32:13 +00:00
Aaron Huang
82948ddb1c Move DhcpInfoTest to frameworks/base/tests/net/common
Address comment from aosp/1162443.
Move to FrameworksNetCommonTests so that it can be run in
cts test and presubmit test.

Also change package name from android.net.cts to android.net

Bug: 154299158
Test: atest FrameworksNetTest
      atest CtsNetTestCasesLatestSdk:android.net.DhcpInfoTest
Change-Id: I42a965ae5cb748fdd80b4d5c0f8b26f36f74be72
2020-04-17 18:26:20 +08:00
Aaron Huang
8d2f514530 Add network agent to enhance NetworkProvider test
Add network agent to test more situation that could get the
onNetworkRequested callback.

Bug: 153614605
Bug: 153613690
Bug: 153612373
Test: atest CtsNetTestCasesLatestSdk:android.net.NetworkProviderTest
Change-Id: Id494a1697cc1b73e8e56ae585a69faec31c59f52
2020-04-17 17:26:07 +08:00
Bruce Chen
1fa430576b [automerger skipped] Merge "Add testTransportTypesEqual to dnsmanager test cases" into rvc-dev am: 60afb5ab62 am: 22c40575a1 -s ours am: 9117323bbf -s ours
am skip reason: Change-Id I6b23ccc6ce1659fdfd9573dfcd895f2c20fa9417 with SHA-1 01950be123 is in history

Change-Id: Ib88ec87dd3e06f06710e2a6d503e6fd43dc3abc7
2020-04-17 08:47:06 +00:00
Automerger Merge Worker
0fe1e30bd6 Merge "[automerger skipped] Merge "Add testTransportTypesEqual to dnsmanager test cases" into rvc-dev am: 60afb5ab62 -s ours am: a1ba33afea -s ours" into rvc-d1-dev-plus-aosp am: 82b8219cc3 -s ours
am skip reason: Change-Id I6b23ccc6ce1659fdfd9573dfcd895f2c20fa9417 with SHA-1 01950be123 is in history

Change-Id: Ifc11762823812bfd7a72e4b8a93d6c0a283ed407
2020-04-17 08:46:53 +00:00
Aaron Huang
b9626ecd40 This contains a squash of two changes
>>>>>>>>>>>>>>>>>>>>>>
aosp/1284588
Adjust permission of NetworkProvider related API

- Allow an app holds NETWORK_SETTINGS to acess registerNetworkProvier()
  and unregisterNetworkProvider().
- To access declareNetworkRequestUnfulfillable(), allow an app holds
  MANAGE_TEST_NETWORKS to declare a unfulfillable request that contains
  TRANSPORT_TEST transport.

This makes easier to write cts to test.
>>>>>>>>>>>>>>>>>>>>>>
aosp/1285957
Add cts test for NetworkProvider

It will skip whole tests on Q device since NetworkProvider class
is introduced in R.

Result on Q device would be:
[1/1] android.net.NetworkProviderTest#skippedClassForDevSdkMismatch: IGNORED (3ms)
>>>>>>>>>>>>>>>>>>>>>>
Bug: 153614605
Bug: 153613690
Bug: 153612373
Test: atest FrameworksNetTests
      atest CtsNetTestCases:android.net.NetworkProviderTest
Test: atest CtsNetTestCasesLatestSdk:android.net.NetworkProviderTest
Change-Id: Ib6f42b8f0e94e8c2715a030587e065864edff25b
Merged-In: Ic9809e731aa811a51c2f82d189372169d99a5ed9
Merged-In: If7bfc7fae503e3497c37754697d0b148ff4cab3b
(cherry picked from commit 10138d42a8f3892fcdb129a39409efe42873f6fe)
2020-04-17 08:45:29 +00:00
Bruce Chen
9117323bbf [automerger skipped] Merge "Add testTransportTypesEqual to dnsmanager test cases" into rvc-dev am: 60afb5ab62 am: 22c40575a1 -s ours
am skip reason: Change-Id I6b23ccc6ce1659fdfd9573dfcd895f2c20fa9417 with SHA-1 01950be123 is in history

Change-Id: I4895ee75b1b1143fd4a05f7cc3e6adf20166fa87
2020-04-17 08:45:01 +00:00
Bruce Chen
0083ca58ac [automerger skipped] Merge "Add testTransportTypesEqual to dnsmanager test cases" into rvc-dev am: 60afb5ab62 -s ours am: a1ba33afea -s ours
am skip reason: Change-Id I6b23ccc6ce1659fdfd9573dfcd895f2c20fa9417 with SHA-1 01950be123 is in history

Change-Id: I1b891ee48ce069985de87a0399305cb6339ed7a7
2020-04-17 08:44:40 +00:00
Bruce Chen
22c40575a1 Merge "Add testTransportTypesEqual to dnsmanager test cases" into rvc-dev am: 60afb5ab62
Change-Id: I652f7383c805d0f5fc2274a731f8267336da53ec
2020-04-17 08:30:46 +00:00
Bruce Chen
a1ba33afea [automerger skipped] Merge "Add testTransportTypesEqual to dnsmanager test cases" into rvc-dev am: 60afb5ab62 -s ours
am skip reason: Change-Id I6b23ccc6ce1659fdfd9573dfcd895f2c20fa9417 with SHA-1 01950be123 is in history

Change-Id: Idd90cbeb0b95a28e160a3511f7239eefa51b5a92
2020-04-17 08:30:40 +00:00
Bruce Chen
60afb5ab62 Merge "Add testTransportTypesEqual to dnsmanager test cases" into rvc-dev 2020-04-17 08:25:23 +00:00
Lorenzo Colitti
2727c9fa58 [automerger skipped] Merge "Support changing the NAT64 prefix without removing it." into rvc-dev am: 6f2a54e75e -s ours am: 5f0041e1a0 -s ours am: bcac17aa68 -s ours
am skip reason: Change-Id I789fe9d46d3ac5d074ae697d23013f24a9e0246d with SHA-1 aa0c7d00cf is in history

Change-Id: I3739e103c93fde00e1cb7985ff20a2a8bfe0b1fa
2020-04-17 08:11:52 +00:00
Automerger Merge Worker
b8f25ff342 Merge "[automerger skipped] Merge "Add a function to process LinkProperties coming from an agent." into rvc-dev am: 448beb4c26 -s ours am: 37852de0bc -s ours" into rvc-d1-dev-plus-aosp am: c4fb87e77f -s ours
am skip reason: Change-Id Ibeeb5f79e8afd3350c935934713d7882f2e0281f with SHA-1 5559f1edd9 is in history

Change-Id: I6d56955cc91fe012c8db82d827fdaf54a2ab59ad
2020-04-17 08:11:39 +00:00