From: Alan T. DeKok Date: Sun, 17 Apr 2022 19:11:38 +0000 (-0400) Subject: break out some more test cases for clarity X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5cda2bb900dec46a9d95fc4cab43007b018d5cc;p=thirdparty%2Ffreeradius-server.git break out some more test cases for clarity --- diff --git a/src/tests/unit/protocols/radius/packet_rfc3162.txt b/src/tests/unit/protocols/radius/packet_rfc3162.txt index 14f58382ab3..4f9969289ab 100644 --- a/src/tests/unit/protocols/radius/packet_rfc3162.txt +++ b/src/tests/unit/protocols/radius/packet_rfc3162.txt @@ -13,6 +13,36 @@ proto radius proto-dictionary radius fuzzer-out radius +# +# one byte is too short for reserved + prefix +# +decode-pair 61 03 00 +match raw.Framed-IPv6-Prefix = 0x00 + +# +# This is 0/0 +# +decode-pair 61 04 00 00 +match Framed-IPv6-Prefix = ::/0 + +# +# Omitting bytes outside of the prefix length +# +decode-pair 61 0c 00 40 20 01 0d b8 0a 0b 12 f0 +match Framed-IPv6-Prefix = 2001:db8:a0b:12f0::/64 + +# +# Same as above, but the trailing bytes are zero. +# +decode-pair 61 14 00 40 20 01 0d b8 0a 0b 12 f0 00 00 00 00 00 00 00 00 +match Framed-IPv6-Prefix = 2001:db8:a0b:12f0::/64 + +# +# trailing bytes outside of the prefix exist, but are not zero +# +decode-pair 61 14 00 40 20 01 0d b8 0a 0b 12 f0 00 00 00 00 00 00 00 01 +match raw.Framed-IPv6-Prefix = 0x004020010db80a0b12f00000000000000001 + # # 1. # @@ -68,4 +98,4 @@ decode-proto - match Packet-Type = Access-Request, Packet-Authentication-Vector = 0x2afdb090418ac6365298fbbb15e0fd2e, User-Name = "bob", User-Password = "hello", NAS-IPv6-Address = 2001:db8:a0b:12f0::1, Framed-IPv6-Prefix = 2001:db8:a0b:12f0::/64, Framed-IPv6-Prefix = 2001:db8:a0b:12f0::/64, Framed-IPv6-Prefix = ::/0, raw.Framed-IPv6-Prefix = 0x00, raw.Framed-IPv6-Prefix = 0x004020010db80a0b12f0000000000000000000, raw.Framed-IPv6-Prefix = 0x008120010db80a0b12f00000000000000001 count -match 9 +match 19