Commit Graph

9830 Commits

Author SHA1 Message Date
Treehugger Robot
6cf22ba23b Merge "Add test for NetworkSpecifier" am: 453a16c2e2 am: b6c55b0a45 am: d785b599a8
Change-Id: I3ad1426aea8340a844f703c877ff732ffc57c528
2020-04-23 15:07:52 +00:00
Treehugger Robot
d785b599a8 Merge "Add test for NetworkSpecifier" am: 453a16c2e2 am: b6c55b0a45
Change-Id: I094afdcb65946deba7fa744f4ed1eb7532b93b27
2020-04-23 14:50:25 +00:00
Treehugger Robot
b6c55b0a45 Merge "Add test for NetworkSpecifier" am: 453a16c2e2
Change-Id: I04cc2a0aad319e4266253267cacaecb517ec6efc
2020-04-23 14:31:52 +00:00
Treehugger Robot
453a16c2e2 Merge "Add test for NetworkSpecifier" 2020-04-23 14:12:37 +00:00
Chiachang Wang
2bdc9ffbf3 Add test for NetworkSpecifier
Tests for canBeSatisfiedBy() and redact()

Bug: 154686765
Test: atest CtsNetTestCasesLatestSdk:android.net.NetworkSpecifierTest
Change-Id: Iade6a5b355b8812a5eb191345dfe393938ee272c
2020-04-23 18:03:16 +08:00
Philip P. Moltmann
ba43d2b37f Merge "Set attributionTag for noteOp(WRITE_SETTINGS) calls" am: da8697a48b am: fd6a76dafc am: 0a2c689963
Change-Id: I9ab0540ee40b9466926f9703b42d79c22e0c16ec
2020-04-22 15:32:28 +00:00
Philip P. Moltmann
0a2c689963 Merge "Set attributionTag for noteOp(WRITE_SETTINGS) calls" am: da8697a48b am: fd6a76dafc
Change-Id: I099944752fc3006c1e98750dd46dbebf5e50789f
2020-04-22 15:19:14 +00:00
Philip P. Moltmann
fd6a76dafc Merge "Set attributionTag for noteOp(WRITE_SETTINGS) calls" am: da8697a48b
Change-Id: I3ddd8954cf8443f549f7965cc43f2600bf92a80b
2020-04-22 15:09:28 +00:00
Lorenzo Colitti
02917c1f19 [automerger skipped] Merge "Stop prefix discovery if an RA prefix arrives in DISCOVERING" into rvc-dev am: a314315001 am: 87c0d4df18 -s ours
am skip reason: Change-Id I3803fa3d9806848b331c35ee8bac256934bd1f21 with SHA-1 c44662351e is in history

Change-Id: I1a0002840b3163a04bea0681225f0c27831ad1a3
2020-04-21 10:31:50 +00:00
Lorenzo Colitti
a186c73174 [automerger skipped] Merge "Make the Nat464Xlat tests more realistic." into rvc-dev am: 6a3e78a97d am: 02a3cb88e4 -s ours
am skip reason: Change-Id I41766e9adaa7c24454648b371e6e3cc647693be5 with SHA-1 e0084efb28 is in history

Change-Id: I39611a9002c5d30ae8f5dd7e680da2c7efbd6248
2020-04-21 10:31:40 +00:00
TreeHugger Robot
9f4372c9bc [automerger skipped] Merge "Add network agent to enhance NetworkProvider test" into rvc-dev am: 1943988c6c am: 3c7cd0b000 -s ours
am skip reason: Change-Id Id494a1697cc1b73e8e56ae585a69faec31c59f52 with SHA-1 efd9d6903a is in history

Change-Id: Id0b95eb38cb198a48b1d879ce8482657b4d8b1f4
2020-04-21 10:31:28 +00:00
Lorenzo Colitti
87c0d4df18 Merge "Stop prefix discovery if an RA prefix arrives in DISCOVERING" into rvc-dev am: a314315001
Change-Id: If85833c1a62b96830cbfeea7bd734190b2d8f1c3
2020-04-21 10:25:44 +00:00
Lorenzo Colitti
02a3cb88e4 Merge "Make the Nat464Xlat tests more realistic." into rvc-dev am: 6a3e78a97d
Change-Id: I733c6565f93a6ab7e19b39f86a3c90837cfa4485
2020-04-21 10:23:37 +00:00
TreeHugger Robot
3c7cd0b000 Merge "Add network agent to enhance NetworkProvider test" into rvc-dev am: 1943988c6c
Change-Id: I57c49e657d1d07d4c15df4893c9e9f3fe984aa11
2020-04-21 10:23:10 +00:00
Lorenzo Colitti
4517689dc1 [automerger skipped] Merge "Support learning the NAT64 prefix from two different sources." into rvc-dev am: 4f7f6d67e9 am: fbae8c5f26 -s ours
am skip reason: Change-Id Ic7452431d2d9aea1ae59b67a9d8383c6cc5b3902 with SHA-1 c2c962ef08 is in history

Change-Id: Ic8af70ae1a29cda5cc6ef33f885db3532037de81
2020-04-21 10:21:53 +00:00
Lorenzo Colitti
fbae8c5f26 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
Philip P. Moltmann
bbf050b58d Set attributionTag for noteOp(WRITE_SETTINGS) calls
Test: atest FrameworksNetTests TetheringTests:TetheringServiceTest
Bug: 136595429
Merged-In: I33f787644c44d7b0e5ce17a433820cfcd985cdfb
Change-Id: Ic3d937e7bb5141798234ed5b2852c1f768e97495
2020-04-20 18:00:03 -07:00
Lorenzo Colitti
9f50308450 [automerger skipped] Merge "Stop prefix discovery if an RA prefix arrives in DISCOVERING" into rvc-dev am: a314315001 -s ours am: 4fc0376da3 -s ours
am skip reason: Change-Id I3803fa3d9806848b331c35ee8bac256934bd1f21 with SHA-1 d8911baa45 is in history

Change-Id: I1ab9d8f022fb7fab636fe7b03ead1d7d3f97aeef
2020-04-20 14:49:39 +00:00
Lorenzo Colitti
36bf65dadb [automerger skipped] Merge "Make the Nat464Xlat tests more realistic." into rvc-dev am: 6a3e78a97d -s ours am: a864001e97 -s ours
am skip reason: Change-Id I41766e9adaa7c24454648b371e6e3cc647693be5 with SHA-1 1076d22c37 is in history

Change-Id: I96feccdbe7ad16d3b1670d439a404aaa27b485b1
2020-04-20 14:49:04 +00:00
TreeHugger Robot
510473aac8 [automerger skipped] Merge "Add network agent to enhance NetworkProvider test" into rvc-dev am: 1943988c6c -s ours am: b037f4ba9c -s ours
am skip reason: Change-Id Id494a1697cc1b73e8e56ae585a69faec31c59f52 with SHA-1 efd9d6903a is in history

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

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

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

Change-Id: I2fc90cbe6f01ba42a6ac47859d07ea3f4da8fb11
2020-04-20 14:30:34 +00:00
Lorenzo Colitti
a314315001 Merge "Stop prefix discovery if an RA prefix arrives in DISCOVERING" into rvc-dev 2020-04-20 14:29:29 +00:00
Lorenzo Colitti
6a3e78a97d Merge "Make the Nat464Xlat tests more realistic." into rvc-dev 2020-04-20 14:19:53 +00:00
TreeHugger Robot
1943988c6c Merge "Add network agent to enhance NetworkProvider test" into rvc-dev 2020-04-20 14:18:10 +00:00
Lorenzo Colitti
1a05283dd0 [automerger skipped] Merge "Support learning the NAT64 prefix from two different sources." into rvc-dev am: 4f7f6d67e9 -s ours am: 98955c3f79 -s ours
am skip reason: Change-Id Ic7452431d2d9aea1ae59b67a9d8383c6cc5b3902 with SHA-1 54fb93fbde is in history

Change-Id: Id0c91aa087b90efc608f63f7ce0f133c0d7a59de
2020-04-20 14:04:25 +00:00
Lorenzo Colitti
98955c3f79 [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 54fb93fbde is in history

Change-Id: I6724e192ae3ad62fd44ead33369f76c9d7709525
2020-04-20 13:56:13 +00:00
Aaron Huang
5769ec5ad7 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
c44662351e 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
e0084efb28 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
c2c962ef08 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
3c23b6ca88 Merge "Stop prefix discovery if an RA prefix arrives in DISCOVERING" am: 1e003f8ef6 am: 75b7cd38b2 am: 60f29587df
Change-Id: I896d49e23b8e7eadb29c930a295655cff5e92349
2020-04-20 11:48:18 +00:00
Lorenzo Colitti
0dc1e1a402 Merge "Make the Nat464Xlat tests more realistic." am: be49675e8d am: 1cfbcd12d6 am: f1e626d293
Change-Id: I31aa59d82248cbb1d2b4f51c6db0ca92e9798143
2020-04-20 11:38:14 +00:00
Lorenzo Colitti
60f29587df Merge "Stop prefix discovery if an RA prefix arrives in DISCOVERING" am: 1e003f8ef6 am: 75b7cd38b2
Change-Id: If6dd56d2860611586af3c434af3ddc4b6df76ab3
2020-04-20 11:38:11 +00:00
Lorenzo Colitti
e96495b03b Merge "Support learning the NAT64 prefix from two different sources." am: 35c55bc6ed am: 2418e4c269 am: 97beff86f9
Change-Id: I455df243a74d9e807e20d3aeada2bc90b565bce3
2020-04-20 11:37:55 +00:00
Lorenzo Colitti
f1e626d293 Merge "Make the Nat464Xlat tests more realistic." am: be49675e8d am: 1cfbcd12d6
Change-Id: Ib8d91c81af3d2e5d03c0fd47f415ff93fee5e2aa
2020-04-20 11:37:54 +00:00
Lorenzo Colitti
97beff86f9 Merge "Support learning the NAT64 prefix from two different sources." am: 35c55bc6ed am: 2418e4c269
Change-Id: I0c7e48c0b16fe09269ced98712bd636105f46a5c
2020-04-20 11:37:18 +00:00
Lorenzo Colitti
75b7cd38b2 Merge "Stop prefix discovery if an RA prefix arrives in DISCOVERING" am: 1e003f8ef6
Change-Id: Ia51addeb9d1f954a396764ec049213ac216b7c1f
2020-04-20 11:21:47 +00:00
Lorenzo Colitti
1cfbcd12d6 Merge "Make the Nat464Xlat tests more realistic." am: be49675e8d
Change-Id: I6a611b7fd7199d8c91baca39e04749ad8852a42e
2020-04-20 11:21:17 +00:00
Lorenzo Colitti
2418e4c269 Merge "Support learning the NAT64 prefix from two different sources." am: 35c55bc6ed
Change-Id: I8778773dab5f46aec6bf18c83d9766687307ca25
2020-04-20 11:20:58 +00:00
Lorenzo Colitti
1e003f8ef6 Merge "Stop prefix discovery if an RA prefix arrives in DISCOVERING" 2020-04-20 11:10:31 +00:00
Lorenzo Colitti
be49675e8d Merge "Make the Nat464Xlat tests more realistic." 2020-04-20 11:06:08 +00:00
Lorenzo Colitti
35c55bc6ed Merge "Support learning the NAT64 prefix from two different sources." 2020-04-20 11:05:52 +00:00
Lorenzo Colitti
d8911baa45 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
1076d22c37 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
bc2e71d17d Merge "Add network agent to enhance NetworkProvider test" am: 9f22c802c3 am: 37a275e9a9 am: 47699d24f3
Change-Id: Ieea40ecca466155a6044ac93544ed6fc5531ef1f
2020-04-20 08:30:29 +00:00
Aaron Huang
47699d24f3 Merge "Add network agent to enhance NetworkProvider test" am: 9f22c802c3 am: 37a275e9a9
Change-Id: I295d001e7b195c523b18b667825a84bb5e862248
2020-04-20 08:11:44 +00:00
Lorenzo Colitti
54fb93fbde 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
37a275e9a9 Merge "Add network agent to enhance NetworkProvider test" am: 9f22c802c3
Change-Id: Ib1b65aec6398f4e6a1cc2e14ec86d669be88ab74
2020-04-20 07:41:36 +00:00