Commit Graph

9954 Commits

Author SHA1 Message Date
Lorenzo Colitti
30ecdb63e7 [automerger skipped] Merge "Make the Nat464Xlat tests more realistic." into rvc-dev am: 840bb2ea6f am: ec9291dea8 -s ours am: 3330938849 -s ours
am skip reason: Change-Id I41766e9adaa7c24454648b371e6e3cc647693be5 with SHA-1 1c0d43fc15 is in history

Change-Id: I534a3ce679c438944ebaceb53419a99048cecc8f
2020-04-21 10:43:27 +00:00
TreeHugger Robot
ac71298160 [automerger skipped] Merge "Add network agent to enhance NetworkProvider test" into rvc-dev am: eb92e57996 am: 5bf2f09286 -s ours am: 9922765c24 -s ours
am skip reason: Change-Id Id494a1697cc1b73e8e56ae585a69faec31c59f52 with SHA-1 8d2f514530 is in history

Change-Id: Id5279c51a1918cc1a4ef1be31292c62792baaeb1
2020-04-21 10:42:55 +00:00
Lorenzo Colitti
3330938849 [automerger skipped] Merge "Make the Nat464Xlat tests more realistic." into rvc-dev am: 840bb2ea6f am: ec9291dea8 -s ours
am skip reason: Change-Id I41766e9adaa7c24454648b371e6e3cc647693be5 with SHA-1 1c0d43fc15 is in history

Change-Id: I39611a9002c5d30ae8f5dd7e680da2c7efbd6248
2020-04-21 10:31:40 +00:00
TreeHugger Robot
9922765c24 [automerger skipped] Merge "Add network agent to enhance NetworkProvider test" into rvc-dev am: eb92e57996 am: 5bf2f09286 -s ours
am skip reason: Change-Id Id494a1697cc1b73e8e56ae585a69faec31c59f52 with SHA-1 8d2f514530 is in history

Change-Id: Id0b95eb38cb198a48b1d879ce8482657b4d8b1f4
2020-04-21 10:31:28 +00:00
Lorenzo Colitti
632d62158c [automerger skipped] Merge "Support learning the NAT64 prefix from two different sources." into rvc-dev am: 4f7f6d67e9 am: 5cb69679b1 -s ours am: 7463ef7894 -s ours
am skip reason: Change-Id Ic7452431d2d9aea1ae59b67a9d8383c6cc5b3902 with SHA-1 4308bfc4f0 is in history

Change-Id: Id96fb58802faa2322449a03b13aff9c0ec2466b2
2020-04-21 10:27:39 +00:00
Lorenzo Colitti
ec9291dea8 Merge "Make the Nat464Xlat tests more realistic." into rvc-dev am: 840bb2ea6f
Change-Id: I733c6565f93a6ab7e19b39f86a3c90837cfa4485
2020-04-21 10:23:37 +00:00
TreeHugger Robot
5bf2f09286 Merge "Add network agent to enhance NetworkProvider test" into rvc-dev am: eb92e57996
Change-Id: I57c49e657d1d07d4c15df4893c9e9f3fe984aa11
2020-04-21 10:23:10 +00:00
Lorenzo Colitti
7463ef7894 [automerger skipped] Merge "Support learning the NAT64 prefix from two different sources." into rvc-dev am: 4f7f6d67e9 am: 5cb69679b1 -s ours
am skip reason: Change-Id Ic7452431d2d9aea1ae59b67a9d8383c6cc5b3902 with SHA-1 4308bfc4f0 is in history

Change-Id: Ic8af70ae1a29cda5cc6ef33f885db3532037de81
2020-04-21 10:21:53 +00:00
Lorenzo Colitti
5cb69679b1 Merge "Support learning the NAT64 prefix from two different sources." into rvc-dev am: 4f7f6d67e9
Change-Id: I930d63aa0364a20141cd8e096a1a8b88e3b81fa7
2020-04-21 10:21:08 +00:00
Lorenzo Colitti
e609c3946e [automerger skipped] Merge "Stop prefix discovery if an RA prefix arrives in DISCOVERING" into rvc-dev am: 83eb86b247 -s ours am: 9442426f95 -s ours am: d6a7bb02f4 -s ours
am skip reason: Change-Id I3803fa3d9806848b331c35ee8bac256934bd1f21 with SHA-1 38c6519a90 is in history

Change-Id: I6943661de46008f5565887648fd63c9a4fd2819c
2020-04-20 15:16:59 +00:00
Lorenzo Colitti
b60c8c4b6e [automerger skipped] Merge "Make the Nat464Xlat tests more realistic." into rvc-dev am: 840bb2ea6f -s ours am: 4396dc8bf5 -s ours am: d24e81a8f0 -s ours
am skip reason: Change-Id I41766e9adaa7c24454648b371e6e3cc647693be5 with SHA-1 c6bd5847c9 is in history

Change-Id: I46755f44a36489590d51008245625f204ca1933c
2020-04-20 15:16:40 +00:00
TreeHugger Robot
980b0bd444 [automerger skipped] Merge "Add network agent to enhance NetworkProvider test" into rvc-dev am: eb92e57996 -s ours am: 8e83e30fbb -s ours am: 8c1afd8f76 -s ours
am skip reason: Change-Id Id494a1697cc1b73e8e56ae585a69faec31c59f52 with SHA-1 8d2f514530 is in history

Change-Id: I99392bbfffe5603e20c598348d25dfbfd7639af5
2020-04-20 15:16:22 +00:00
Lorenzo Colitti
d6a7bb02f4 [automerger skipped] Merge "Stop prefix discovery if an RA prefix arrives in DISCOVERING" into rvc-dev am: 83eb86b247 -s ours am: 9442426f95 -s ours
am skip reason: Change-Id I3803fa3d9806848b331c35ee8bac256934bd1f21 with SHA-1 38c6519a90 is in history

Change-Id: I1ab9d8f022fb7fab636fe7b03ead1d7d3f97aeef
2020-04-20 14:49:39 +00:00
Lorenzo Colitti
d24e81a8f0 [automerger skipped] Merge "Make the Nat464Xlat tests more realistic." into rvc-dev am: 840bb2ea6f -s ours am: 4396dc8bf5 -s ours
am skip reason: Change-Id I41766e9adaa7c24454648b371e6e3cc647693be5 with SHA-1 c6bd5847c9 is in history

Change-Id: I96feccdbe7ad16d3b1670d439a404aaa27b485b1
2020-04-20 14:49:04 +00:00
TreeHugger Robot
8c1afd8f76 [automerger skipped] Merge "Add network agent to enhance NetworkProvider test" into rvc-dev am: eb92e57996 -s ours am: 8e83e30fbb -s ours
am skip reason: Change-Id Id494a1697cc1b73e8e56ae585a69faec31c59f52 with SHA-1 8d2f514530 is in history

Change-Id: I05d9159176a01ef6d840eb81a4b737c42366fca3
2020-04-20 14:47:26 +00:00
Lorenzo Colitti
9442426f95 [automerger skipped] Merge "Stop prefix discovery if an RA prefix arrives in DISCOVERING" into rvc-dev am: 83eb86b247 -s ours
am skip reason: Change-Id I3803fa3d9806848b331c35ee8bac256934bd1f21 with SHA-1 38c6519a90 is in history

Change-Id: Ia03b25467390136e847f1ecde7e4f1cbe5ee6451
2020-04-20 14:31:07 +00:00
Lorenzo Colitti
4396dc8bf5 [automerger skipped] Merge "Make the Nat464Xlat tests more realistic." into rvc-dev am: 840bb2ea6f -s ours
am skip reason: Change-Id I41766e9adaa7c24454648b371e6e3cc647693be5 with SHA-1 c6bd5847c9 is in history

Change-Id: Ib62c56f16ad3df8a98038271ea5d57e0ed189192
2020-04-20 14:30:55 +00:00
TreeHugger Robot
8e83e30fbb [automerger skipped] Merge "Add network agent to enhance NetworkProvider test" into rvc-dev am: eb92e57996 -s ours
am skip reason: Change-Id Id494a1697cc1b73e8e56ae585a69faec31c59f52 with SHA-1 8d2f514530 is in history

Change-Id: I2fc90cbe6f01ba42a6ac47859d07ea3f4da8fb11
2020-04-20 14:30:34 +00:00
Lorenzo Colitti
83eb86b247 Merge "Stop prefix discovery if an RA prefix arrives in DISCOVERING" into rvc-dev 2020-04-20 14:29:29 +00:00
Lorenzo Colitti
840bb2ea6f Merge "Make the Nat464Xlat tests more realistic." into rvc-dev 2020-04-20 14:19:53 +00:00
TreeHugger Robot
eb92e57996 Merge "Add network agent to enhance NetworkProvider test" into rvc-dev 2020-04-20 14:18:10 +00:00
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
Aaron Huang
4f5455fb44 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: I7f827710b47546bd4419cc1ff06f03ec4635583d
Merged-In: Id494a1697cc1b73e8e56ae585a69faec31c59f52
(cherry picked from commit 9e92e57fd70944cbe8bb61bbb7a5fa728d0e68f5)
2020-04-20 12:13:03 +00:00
Lorenzo Colitti
c9016cafe3 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
Merged-In: I3803fa3d9806848b331c35ee8bac256934bd1f21
(cherry picked from commit c7c6f76402a989f91b02c37574b6a9de592cf1af)
2020-04-20 12:06:45 +00:00
Lorenzo Colitti
1c0d43fc15 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
Merged-In: I41766e9adaa7c24454648b371e6e3cc647693be5
(cherry picked from commit df0c522d18ee73c1d20cff1a1dc955b383e6c355)
2020-04-20 12:05:36 +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