diff options
author | Lorenzo Colitti <lorenzo@google.com> | 2020-05-07 13:55:42 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-05-07 13:55:42 +0000 |
commit | 055652bf53bb1a2369882b747b7c3fc9c4105b4f (patch) | |
tree | 49ad6cf77f8d478ae42c7bac2d9dc35c657cfb98 | |
parent | b12790b92269c9810122c414d77a592f9f17cc35 (diff) | |
parent | c193cc0099006dae01922090a248fafbd6f2368c (diff) |
Merge "Test that the system doesn't accept non-/96 NAT64 prefixes." into rvc-dev
-rw-r--r-- | tests/integration/src/android/net/ip/IpClientIntegrationTest.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/integration/src/android/net/ip/IpClientIntegrationTest.java b/tests/integration/src/android/net/ip/IpClientIntegrationTest.java index 4a3f445..e286439 100644 --- a/tests/integration/src/android/net/ip/IpClientIntegrationTest.java +++ b/tests/integration/src/android/net/ip/IpClientIntegrationTest.java @@ -1528,6 +1528,13 @@ public class IpClientIntegrationTest { expectAlarmCancelled(inOrder, pref64Alarm); expectNat64PrefixUpdate(inOrder, null); + // Announce a non-/96 prefix and expect it to be ignored. + IpPrefix invalidPrefix = new IpPrefix("64:ff9b::/64"); + pref64 = new StructNdOptPref64(invalidPrefix, 1200).toByteBuffer(); + ra = buildRaPacket(pio, rdnss, pref64); + mPacketReader.sendResponse(ra); + expectNoNat64PrefixUpdate(inOrder, invalidPrefix); + // Re-announce the prefix. pref64 = new StructNdOptPref64(prefix, 600).toByteBuffer(); ra = buildRaPacket(pio, rdnss, pref64); |