From: Nick Porter Date: Wed, 2 Oct 2024 16:46:25 +0000 (+0100) Subject: Add tests of multiple vendors inside DHCPv4 V-I-Vendor-Specific X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37507c6cc3eeecea803ab8b5c411d151e3f2c620;p=thirdparty%2Ffreeradius-server.git Add tests of multiple vendors inside DHCPv4 V-I-Vendor-Specific --- diff --git a/src/tests/unit/protocols/dhcpv4/vendor.txt b/src/tests/unit/protocols/dhcpv4/vendor.txt index 30ebba18fd1..38c31bd7d15 100644 --- a/src/tests/unit/protocols/dhcpv4/vendor.txt +++ b/src/tests/unit/protocols/dhcpv4/vendor.txt @@ -35,5 +35,20 @@ match 7d 0e 00 00 0d e9 09 01 01 01 02 01 02 03 01 03 decode-pair 7d 0d 00 00 00 09 09 05 06 61 61 2e 74 78 74 match V-I-Vendor-Specific = { raw.Cisco = 0x09050661612e747874 } +# +# Multiple vendors - should result in a single option with multiple vendors inside +# +encode-pair V-I-Vendor-Specific = { CTS = { Server-Login-Name = "anonymous" }, Cisco = { Indirect-Image-Filename = "aa.txt" } } +match 7d 1d 00 00 24 58 0b 03 09 61 6e 6f 6e 79 6d 6f 75 73 00 00 00 09 08 05 06 61 61 2e 74 78 74 + +decode-pair - +match V-I-Vendor-Specific = { CTS = { Server-Login-Name = "anonymous" }, Cisco = { Indirect-Image-Filename = "aa.txt" } } + +encode-pair V-I-Vendor-Specific.Cisco.Indirect-Image-Filename = "aa.txt", V-I-Vendor-Specific.Cisco.Indirect-Image-Filename = "bb.txt", V-I-Vendor-Specific.ADSL-Forum.Manufacturer-OUI = 0x01, V-I-Vendor-Specific.ADSL-Forum.Device-Serial-Number = 0x02, V-I-Vendor-Specific.ADSL-Forum.Device-Product-Class = 0x03 +match 7d 23 00 00 00 09 10 05 06 61 61 2e 74 78 74 05 06 62 62 2e 74 78 74 00 00 0d e9 09 01 01 01 02 01 02 03 01 03 + +decode-pair - +match V-I-Vendor-Specific = { Cisco = { Indirect-Image-Filename = "aa.txt", Indirect-Image-Filename = "bb.txt" }, ADSL-Forum = { Manufacturer-OUI = 0x01, Device-Serial-Number = 0x02, Device-Product-Class = 0x03 } } + count -match 19 +match 27