]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
decode as nested
authorAlan T. DeKok <aland@freeradius.org>
Wed, 6 Sep 2023 12:07:35 +0000 (08:07 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 6 Sep 2023 12:09:17 +0000 (08:09 -0400)
except for FR_TYPE_GROUP, which gets put into the group VP, but
the attributes are decoded from the dict root

@todo - we don't coalesce vendor / VSA data types, and we should
probably do that.

src/protocols/dhcpv6/decode.c
src/tests/unit/protocols/dhcpv6/microsoft.txt
src/tests/unit/protocols/dhcpv6/packet_ntp-server.txt
src/tests/unit/protocols/dhcpv6/relay_forward.txt
src/tests/unit/protocols/dhcpv6/rfc5678.txt
src/tests/unit/protocols/dhcpv6/tlvs.txt

index d064093aaaf047f4ebd1d2995f798e23e7e95bde..df3cd65b575a90dcc4bce56c23fde5a74dab95fb 100644 (file)
@@ -289,7 +289,7 @@ static ssize_t decode_vsa(TALLOC_CTX *ctx, fr_pair_list_t *out,
 
        FR_PROTO_TRACE("decode context %s -> %s", parent->name, da->name);
 
-       return fr_pair_tlvs_from_network(ctx, out, da, data + 4, data_len - 4, decode_ctx, decode_option, NULL, false);
+       return fr_pair_tlvs_from_network(ctx, out, da, data + 4, data_len - 4, decode_ctx, decode_option, NULL, true);
 }
 
 static ssize_t decode_option(TALLOC_CTX *ctx, fr_pair_list_t *out,
@@ -362,7 +362,7 @@ static ssize_t decode_option(TALLOC_CTX *ctx, fr_pair_list_t *out,
                slen = decode_vsa(ctx, out, da, data + 4, len, decode_ctx);
 
        } else if (da->type == FR_TYPE_TLV) {
-               slen = fr_pair_tlvs_from_network(ctx, out, da, data + 4, len, decode_ctx, decode_option, NULL, false);
+               slen = fr_pair_tlvs_from_network(ctx, out, da, data + 4, len, decode_ctx, decode_option, NULL, true);
 
        } else {
                slen = decode_value(ctx, out, da, data + 4, len, decode_ctx);
index bb2e59c08444c607388b6c5f6fd6ed223ecb16be..a612b2fd7a5b25d41e1f04d1e8fb47035a4656ca 100644 (file)
@@ -16,7 +16,7 @@ encode-pair Vendor-Opts.Microsoft.Rogue-Detection-Request = 0x00
 match 00 11 00 09 00 00 01 37 00 5e 00 01 00
 
 decode-pair -
-match Vendor-Opts.Microsoft.Rogue-Detection-Request = 0x00
+match Vendor-Opts.Microsoft = { Rogue-Detection-Request = 0x00 }
 
 count
 match 7
index 87950bb7a4791fc64b30355c3ca995701cc22e0e..44aed364b06a6fe32834d1d07506a7faeb689141 100644 (file)
@@ -43,7 +43,7 @@ fuzzer-out dhcpv6
 #      data      = '\x00\x01\x00\x10*\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x02\x00\x10\xff\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x00\x03\x00\x11\x03ntp\x07example\x03com\x00'
 #
 decode-proto 07 f6 9b 57 00 01 00 0e 00 01 00 01 18 f0 0b 3f 00 0c 29 38 f3 68 00 02 00 0e 00 01 00 01 18 ef 95 1b 00 0c 29 9b a1 53 00 38 00 3d 00 01 00 10 2a 01 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 02 00 10 ff 05 00 00 00 00 00 00 00 00 00 00 00 00 01 01 00 03 00 11 03 6e 74 70 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00
-match Packet-Type = Reply, Transaction-ID = 0xf69b57, Client-ID = { DUID = LLT, DUID.LLT = { Hardware-Type = Ethernet, Time = "Apr  4 2013 09:58:23 UTC", Hardware-Type.Ethernet = { Address = 00:0c:29:38:f3:68 } } }, Server-ID = { DUID = LLT, DUID.LLT = { Hardware-Type = Ethernet, Time = "Apr  4 2013 01:34:19 UTC", Hardware-Type.Ethernet = { Address = 00:0c:29:9b:a1:53 } } }, NTP-Server.Address = 2a01::1, NTP-Server.Multicast-Address = ff05::101, NTP-Server.FQDN = "ntp.example.com"
+match Packet-Type = Reply, Transaction-ID = 0xf69b57, Client-ID = { DUID = LLT, DUID.LLT = { Hardware-Type = Ethernet, Time = "Apr  4 2013 09:58:23 UTC", Hardware-Type.Ethernet = { Address = 00:0c:29:38:f3:68 } } }, Server-ID = { DUID = LLT, DUID.LLT = { Hardware-Type = Ethernet, Time = "Apr  4 2013 01:34:19 UTC", Hardware-Type.Ethernet = { Address = 00:0c:29:9b:a1:53 } } }, NTP-Server = { Address = 2a01::1, Multicast-Address = ff05::101, FQDN = "ntp.example.com" }
 
 encode-proto -
 match 07 f6 9b 57 00 01 00 0e 00 01 00 01 18 f0 0b 3f 00 0c 29 38 f3 68 00 02 00 0e 00 01 00 01 18 ef 95 1b 00 0c 29 9b a1 53 00 38 00 3d 00 01 00 10 2a 01 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 02 00 10 ff 05 00 00 00 00 00 00 00 00 00 00 00 00 01 01 00 03 00 11 03 6e 74 70 07 65 78 61 6d 70 6c 65 03 63 6f 6d 00
index e26575a9abeb82c124c3ccc57e03a9f9d1352761..0bc5bdd248196196244d57bb05b0fff9b14c77be 100644 (file)
@@ -11,8 +11,33 @@ proto dhcpv6
 proto-dictionary dhcpv6
 fuzzer-out dhcpv6
 
-decode-proto 0c0126058600000680000000000000000000fe80000000000000025056fffea353fe000900c40c0000000000000000000000000000000000fe80000000000000025056fffea353fe0012001c4c41424f4c54322065746820312f312f30352f30312f32382f312f310009007e011141d70001000e0001000126b1b7f1005056a353fe0012001c4c41424f4c54322065746820312f312f30352f30312f32382f312f310006000200180008000200000003002856a353fe00000e1000001518000500182605860000064000000000000000000100001c2000002a300019000c56a353fe00000e1000001518002500120000197f0001000126b1b7f1005056a353fe0011002a0000197f0001000a4c41424f4c54322d6e610002000a4c41424f4c54322d7064000300013f0004000140
-match Packet-Type = Relay-Forward, Hop-Count = 1, Relay-Link-Address = 2605:8600:6:8000::, Relay-Peer-Address = fe80::250:56ff:fea3:53fe, Relay-Message = { Packet-Type = Relay-Forward, Hop-Count = 0, Relay-Link-Address = ::, Relay-Peer-Address = fe80::250:56ff:fea3:53fe, Interface-ID = 0x4c41424f4c54322065746820312f312f30352f30312f32382f312f31, Relay-Message = { Packet-Type = Solicit, Transaction-ID = 0x1141d7, Client-ID = { DUID = LLT, DUID.LLT = { Hardware-Type = Ethernet, Time = "Jul 27 2020 16:06:09 UTC", Hardware-Type.Ethernet = { Address = 00:50:56:a3:53:fe } } }, Interface-ID = 0x4c41424f4c54322065746820312f312f30352f30312f32382f312f31, Option-Request = Domain-List, Elapsed-Time = 0, IA-NA = { IAID = 1453544446, T1 = 3600, T2 = 5400, Options = { IA-Addr = { IPv6-Address = 2605:8600:6:4000::1, Preferred-Lifetime = 7200, Valid-Lifetime = 10800 } } }, IA-PD = { IAID = 1453544446, T1 = 3600, T2 = 5400 } } }, Relay-Agent-Remote-ID = { Vendor = 6527, Value = 0x0001000126b1b7f1005056a353fe }, Vendor-Opts.Nokia-SR.WAN-Pool = "LABOLT2-na", Vendor-Opts.Nokia-SR.PFX-Pool = "LABOLT2-pd", Vendor-Opts.Nokia-SR.PFX-Len = 63, Vendor-Opts.Nokia-SR.Reserved-NA-Len = 64
+encode-pair Vendor-Opts.Nokia-SR = { WAN-Pool = "LABOLT2-na", PFX-Pool = "LABOLT2-pd", PFX-Len = 63, Reserved-NA-Len = 64 }
+match 00 11 00 2a 00 00 19 7f 00 01 00 0a 4c 41 42 4f 4c 54 32 2d 6e 61 00 02 00 0a 4c 41 42 4f 4c 54 32 2d 70 64 00 03 00 01 3f 00 04 00 01 40
+
+decode-pair -
+match Vendor-Opts.Nokia-SR = { WAN-Pool = "LABOLT2-na", PFX-Pool = "LABOLT2-pd", PFX-Len = 63, Reserved-NA-Len = 64 }
+
+encode-pair Vendor-Opts.Nokia-SR = { WAN-Pool = "LABOLT2-na" }, Vendor-Opts.Nokia-SR = { PFX-Pool = "LABOLT2-pd" }, Vendor-Opts.Nokia-SR = { PFX-Len = 63 }, Vendor-Opts.Nokia-SR = { Reserved-NA-Len = 64 }
+match 00 11 00 12 00 00 19 7f 00 01 00 0a 4c 41 42 4f 4c 54 32 2d 6e 61 00 11 00 12 00 00 19 7f 00 02 00 0a 4c 41 42 4f 4c 54 32 2d 70 64 00 11 00 09 00 00 19 7f 00 03 00 01 3f 00 11 00 09 00 00 19 7f 00 04 00 01 40
+
+#
+#  @todo - the Nokia vendor opts should be decoded into the parent Vendor-Opts
+#
+decode-pair -
+match Vendor-Opts.Nokia-SR = { WAN-Pool = "LABOLT2-na" }, Vendor-Opts.Nokia-SR = { PFX-Pool = "LABOLT2-pd" }, Vendor-Opts.Nokia-SR = { PFX-Len = 63 }, Vendor-Opts.Nokia-SR = { Reserved-NA-Len = 64 }
+
+decode-proto 0c 01 26 05 86 00 00 06 80 00 00 00 00 00 00 00 00 00 fe 80 00 00 00 00 00 00 02 50 56 ff fe a3 53 fe 00 09 00 c4 0c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fe 80 00 00 00 00 00 00 02 50 56 ff fe a3 53 fe 00 12 00 1c 4c 41 42 4f 4c 54 32 20 65 74 68 20 31 2f 31 2f 30 35 2f 30 31 2f 32 38 2f 31 2f 31 00 09 00 7e 01 11 41 d7 00 01 00 0e 00 01 00 01 26 b1 b7 f1 00 50 56 a3 53 fe 00 12 00 1c 4c 41 42 4f 4c 54 32 20 65 74 68 20 31 2f 31 2f 30 35 2f 30 31 2f 32 38 2f 31 2f 31 00 06 00 02 00 18 00 08 00 02 00 00 00 03 00 28 56 a3 53 fe 00 00 0e 10 00 00 15 18 00 05 00 18 26 05 86 00 00 06 40 00 00 00 00 00 00 00 00 01 00 00 1c 20 00 00 2a 30 00 19 00 0c 56 a3 53 fe 00 00 0e 10 00 00 15 18 00 25 00 12 00 00 19 7f 00 01 00 01 26 b1 b7 f1 00 50 56 a3 53 fe 00 11 00 2a 00 00 19 7f 00 01 00 0a 4c 41 42 4f 4c 54 32 2d 6e 61 00 02 00 0a 4c 41 42 4f 4c 54 32 2d 70 64 00 03 00 01 3f 00 04 00 01 40
+match Packet-Type = Relay-Forward, Hop-Count = 1, Relay-Link-Address = 2605:8600:6:8000::, Relay-Peer-Address = fe80::250:56ff:fea3:53fe, Relay-Message = { Packet-Type = Relay-Forward, Hop-Count = 0, Relay-Link-Address = ::, Relay-Peer-Address = fe80::250:56ff:fea3:53fe, Interface-ID = 0x4c41424f4c54322065746820312f312f30352f30312f32382f312f31, Relay-Message = { Packet-Type = Solicit, Transaction-ID = 0x1141d7, Client-ID = { DUID = LLT, DUID.LLT = { Hardware-Type = Ethernet, Time = "Jul 27 2020 16:06:09 UTC", Hardware-Type.Ethernet = { Address = 00:50:56:a3:53:fe } } }, Interface-ID = 0x4c41424f4c54322065746820312f312f30352f30312f32382f312f31, Option-Request = Domain-List, Elapsed-Time = 0, IA-NA = { IAID = 1453544446, T1 = 3600, T2 = 5400, Options = { IA-Addr = { IPv6-Address = 2605:8600:6:4000::1, Preferred-Lifetime = 7200, Valid-Lifetime = 10800 } } }, IA-PD = { IAID = 1453544446, T1 = 3600, T2 = 5400 } } }, Relay-Agent-Remote-ID = { Vendor = 6527, Value = 0x0001000126b1b7f1005056a353fe }, Vendor-Opts.Nokia-SR = { WAN-Pool = "LABOLT2-na", PFX-Pool = "LABOLT2-pd", PFX-Len = 63, Reserved-NA-Len = 64 }
+
+#
+#  @todo - encoding the above attributes results not in the input hex string, but the subsequent one. The Nokia-SR options are encoded differently.
+#  instead of encoding them all in one DHCPv6 option, they are encoded as separate ones.
+#
+#encode-proto -
+#match 0c 01 26 05 86 00 00 06 80 00 00 00 00 00 00 00 00 00 fe 80 00 00 00 00 00 00 02 50 56 ff fe a3 53 fe 00 09 00 c4 0c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fe 80 00 00 00 00 00 00 02 50 56 ff fe a3 53 fe 00 12 00 1c 4c 41 42 4f 4c 54 32 20 65 74 68 20 31 2f 31 2f 30 35 2f 30 31 2f 32 38 2f 31 2f 31 00 09 00 7e 01 11 41 d7 00 01 00 0e 00 01 00 01 26 b1 b7 f1 00 50 56 a3 53 fe 00 12 00 1c 4c 41 42 4f 4c 54 32 20 65 74 68 20 31 2f 31 2f 30 35 2f 30 31 2f 32 38 2f 31 2f 31 00 06 00 02 00 18 00 08 00 02 00 00 00 03 00 28 56 a3 53 fe 00 00 0e 10 00 00 15 18 00 05 00 18 26 05 86 00 00 06 40 00 00 00 00 00 00 00 00 01 00 00 1c 20 00 00 2a 30 00 19 00 0c 56 a3 53 fe 00 00 0e 10 00 00 15 18 00 25 00 12 00 00 19 7f 00 01 00 01 26 b1 b7 f1 00 50 56 a3 53 fe 00 11 00 2a 00 00 19 7f 00 01 00 0a 4c 41 42 4f 4c 54 32 2d 6e 61 00 02 00 0a 4c 41 42 4f 4c 54 32 2d 70 64 00 03 00 01 3f 00 04 00 01 40
+
+decode-proto 0c 01 26 05 86 00 00 06 80 00 00 00 00 00 00 00 00 00 fe 80 00 00 00 00 00 00 02 50 56 ff fe a3 53 fe 00 09 00 c4 0c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fe 80 00 00 00 00 00 00 02 50 56 ff fe a3 53 fe 00 12 00 1c 4c 41 42 4f 4c 54 32 20 65 74 68 20 31 2f 31 2f 30 35 2f 30 31 2f 32 38 2f 31 2f 31 00 09 00 7e 01 11 41 d7 00 01 00 0e 00 01 00 01 26 b1 b7 f1 00 50 56 a3 53 fe 00 12 00 1c 4c 41 42 4f 4c 54 32 20 65 74 68 20 31 2f 31 2f 30 35 2f 30 31 2f 32 38 2f 31 2f 31 00 06 00 02 00 18 00 08 00 02 00 00 00 03 00 28 56 a3 53 fe 00 00 0e 10 00 00 15 18 00 05 00 18 26 05 86 00 00 06 40 00 00 00 00 00 00 00 00 01 00 00 1c 20 00 00 2a 30 00 19 00 0c 56 a3 53 fe 00 00 0e 10 00 00 15 18 00 25 00 12 00 00 19 7f 00 01 00 01 26 b1 b7 f1 00 50 56 a3 53 fe 00 11 00 12 00 00 19 7f 00 01 00 0a 4c 41 42 4f 4c 54 32 2d 6e 61 00 11 00 12 00 00 19 7f 00 02 00 0a 4c 41 42 4f 4c 54 32 2d 70 64 00 11 00 09 00 00 19 7f 00 03 00 01 3f 00 11 00 09 00 00 19 7f 00 04 00 01 40
+match Packet-Type = Relay-Forward, Hop-Count = 1, Relay-Link-Address = 2605:8600:6:8000::, Relay-Peer-Address = fe80::250:56ff:fea3:53fe, Relay-Message = { Packet-Type = Relay-Forward, Hop-Count = 0, Relay-Link-Address = ::, Relay-Peer-Address = fe80::250:56ff:fea3:53fe, Interface-ID = 0x4c41424f4c54322065746820312f312f30352f30312f32382f312f31, Relay-Message = { Packet-Type = Solicit, Transaction-ID = 0x1141d7, Client-ID = { DUID = LLT, DUID.LLT = { Hardware-Type = Ethernet, Time = "Jul 27 2020 16:06:09 UTC", Hardware-Type.Ethernet = { Address = 00:50:56:a3:53:fe } } }, Interface-ID = 0x4c41424f4c54322065746820312f312f30352f30312f32382f312f31, Option-Request = Domain-List, Elapsed-Time = 0, IA-NA = { IAID = 1453544446, T1 = 3600, T2 = 5400, Options = { IA-Addr = { IPv6-Address = 2605:8600:6:4000::1, Preferred-Lifetime = 7200, Valid-Lifetime = 10800 } } }, IA-PD = { IAID = 1453544446, T1 = 3600, T2 = 5400 } } }, Relay-Agent-Remote-ID = { Vendor = 6527, Value = 0x0001000126b1b7f1005056a353fe }, Vendor-Opts.Nokia-SR = { WAN-Pool = "LABOLT2-na" }, Vendor-Opts.Nokia-SR = { PFX-Pool = "LABOLT2-pd" }, Vendor-Opts.Nokia-SR = { PFX-Len = 63 }, Vendor-Opts.Nokia-SR = { Reserved-NA-Len = 64 }
 
 encode-proto -
 match 0c 01 26 05 86 00 00 06 80 00 00 00 00 00 00 00 00 00 fe 80 00 00 00 00 00 00 02 50 56 ff fe a3 53 fe 00 09 00 c4 0c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fe 80 00 00 00 00 00 00 02 50 56 ff fe a3 53 fe 00 12 00 1c 4c 41 42 4f 4c 54 32 20 65 74 68 20 31 2f 31 2f 30 35 2f 30 31 2f 32 38 2f 31 2f 31 00 09 00 7e 01 11 41 d7 00 01 00 0e 00 01 00 01 26 b1 b7 f1 00 50 56 a3 53 fe 00 12 00 1c 4c 41 42 4f 4c 54 32 20 65 74 68 20 31 2f 31 2f 30 35 2f 30 31 2f 32 38 2f 31 2f 31 00 06 00 02 00 18 00 08 00 02 00 00 00 03 00 28 56 a3 53 fe 00 00 0e 10 00 00 15 18 00 05 00 18 26 05 86 00 00 06 40 00 00 00 00 00 00 00 00 01 00 00 1c 20 00 00 2a 30 00 19 00 0c 56 a3 53 fe 00 00 0e 10 00 00 15 18 00 25 00 12 00 00 19 7f 00 01 00 01 26 b1 b7 f1 00 50 56 a3 53 fe 00 11 00 12 00 00 19 7f 00 01 00 0a 4c 41 42 4f 4c 54 32 2d 6e 61 00 11 00 12 00 00 19 7f 00 02 00 0a 4c 41 42 4f 4c 54 32 2d 70 64 00 11 00 09 00 00 19 7f 00 03 00 01 3f 00 11 00 09 00 00 19 7f 00 04 00 01 40
@@ -21,7 +46,7 @@ match 0c 01 26 05 86 00 00 06 80 00 00 00 00 00 00 00 00 00 fe 80 00 00 00 00 00
 #  Yes, this is exactly the same massive text blob as above. :)
 #
 decode-proto -
-match Packet-Type = Relay-Forward, Hop-Count = 1, Relay-Link-Address = 2605:8600:6:8000::, Relay-Peer-Address = fe80::250:56ff:fea3:53fe, Relay-Message = { Packet-Type = Relay-Forward, Hop-Count = 0, Relay-Link-Address = ::, Relay-Peer-Address = fe80::250:56ff:fea3:53fe, Interface-ID = 0x4c41424f4c54322065746820312f312f30352f30312f32382f312f31, Relay-Message = { Packet-Type = Solicit, Transaction-ID = 0x1141d7, Client-ID = { DUID = LLT, DUID.LLT = { Hardware-Type = Ethernet, Time = "Jul 27 2020 16:06:09 UTC", Hardware-Type.Ethernet = { Address = 00:50:56:a3:53:fe } } }, Interface-ID = 0x4c41424f4c54322065746820312f312f30352f30312f32382f312f31, Option-Request = Domain-List, Elapsed-Time = 0, IA-NA = { IAID = 1453544446, T1 = 3600, T2 = 5400, Options = { IA-Addr = { IPv6-Address = 2605:8600:6:4000::1, Preferred-Lifetime = 7200, Valid-Lifetime = 10800 } } }, IA-PD = { IAID = 1453544446, T1 = 3600, T2 = 5400 } } }, Relay-Agent-Remote-ID = { Vendor = 6527, Value = 0x0001000126b1b7f1005056a353fe }, Vendor-Opts.Nokia-SR.WAN-Pool = "LABOLT2-na", Vendor-Opts.Nokia-SR.PFX-Pool = "LABOLT2-pd", Vendor-Opts.Nokia-SR.PFX-Len = 63, Vendor-Opts.Nokia-SR.Reserved-NA-Len = 64
+match Packet-Type = Relay-Forward, Hop-Count = 1, Relay-Link-Address = 2605:8600:6:8000::, Relay-Peer-Address = fe80::250:56ff:fea3:53fe, Relay-Message = { Packet-Type = Relay-Forward, Hop-Count = 0, Relay-Link-Address = ::, Relay-Peer-Address = fe80::250:56ff:fea3:53fe, Interface-ID = 0x4c41424f4c54322065746820312f312f30352f30312f32382f312f31, Relay-Message = { Packet-Type = Solicit, Transaction-ID = 0x1141d7, Client-ID = { DUID = LLT, DUID.LLT = { Hardware-Type = Ethernet, Time = "Jul 27 2020 16:06:09 UTC", Hardware-Type.Ethernet = { Address = 00:50:56:a3:53:fe } } }, Interface-ID = 0x4c41424f4c54322065746820312f312f30352f30312f32382f312f31, Option-Request = Domain-List, Elapsed-Time = 0, IA-NA = { IAID = 1453544446, T1 = 3600, T2 = 5400, Options = { IA-Addr = { IPv6-Address = 2605:8600:6:4000::1, Preferred-Lifetime = 7200, Valid-Lifetime = 10800 } } }, IA-PD = { IAID = 1453544446, T1 = 3600, T2 = 5400 } } }, Relay-Agent-Remote-ID = { Vendor = 6527, Value = 0x0001000126b1b7f1005056a353fe }, Vendor-Opts.Nokia-SR = { WAN-Pool = "LABOLT2-na" }, Vendor-Opts.Nokia-SR = { PFX-Pool = "LABOLT2-pd" }, Vendor-Opts.Nokia-SR = { PFX-Len = 63 }, Vendor-Opts.Nokia-SR = { Reserved-NA-Len = 64 }
 
 count
-match 9
+match 19
index 3cc4e182d6c11c6683894db30d94d21c88403069..25022341e6ca2b583afc3bdaba601ae0bdaffa6c 100644 (file)
@@ -19,7 +19,7 @@ encode-pair MOD-Address-List.IS = ::1, MOD-Address-List.CS = ::2
 match 00 36 00 28 00 01 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 02 00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02
 
 decode-pair -
-match MOD-Address-List.IS = ::1, MOD-Address-List.CS = ::2
+match MOD-Address-List = { IS = ::1, CS = ::2 }
 
 #
 #  And again as nested attributes
index 0a079ddd95293b63667c1f9a9d67c8e72242d902..06f7215c41c429797ad8f9581c994c2e5c6a33cd 100644 (file)
@@ -16,19 +16,19 @@ encode-pair MOD-Address-List.IS = 2001:db8:85a3::8a2e:370:7334
 match 00 36 00 14 00 01 00 10 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 34
 
 decode-pair -
-match MOD-Address-List.IS = 2001:db8:85a3::8a2e:370:7334
+match MOD-Address-List = { IS = 2001:db8:85a3::8a2e:370:7334 }
 
 encode-pair MOD-Address-List.IS = 2001:db8:85a3:0000:0000:8a2e:0370:7334, MOD-Address-List.IS = 2001:0db8:85a3:0000:0000:8a2e:0370:7335
 match 00 36 00 24 00 01 00 20 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 34 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 35
 
 decode-pair -
-match MOD-Address-List.IS = 2001:db8:85a3::8a2e:370:7334, MOD-Address-List.IS = 2001:db8:85a3::8a2e:370:7335
+match MOD-Address-List = { IS = 2001:db8:85a3::8a2e:370:7334, IS = 2001:db8:85a3::8a2e:370:7335 }
 
 encode-pair MOD-Address-List.IS = 2001:0db8:85a3:0000:0000:8a2e:0370:7334, MOD-Address-List.ES = 2001:0db8:85a3:0000:0000:8a2e:0370:7335
 match 00 36 00 28 00 01 00 10 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 34 00 03 00 10 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 35
 
 decode-pair -
-match MOD-Address-List.IS = 2001:db8:85a3::8a2e:370:7334, MOD-Address-List.ES = 2001:db8:85a3::8a2e:370:7335
+match MOD-Address-List = { IS = 2001:db8:85a3::8a2e:370:7334, ES = 2001:db8:85a3::8a2e:370:7335 }
 
 #
 #  TLV with single values
@@ -37,7 +37,7 @@ encode-pair NTP-Server.Address = 2001:0db8:85a3:0000:0000:8a2e:0370:7334
 match 00 38 00 14 00 01 00 10 20 01 0d b8 85 a3 00 00 00 00 8a 2e 03 70 73 34
 
 decode-pair -
-match NTP-Server.Address = 2001:db8:85a3::8a2e:370:7334
+match NTP-Server = { Address = 2001:db8:85a3::8a2e:370:7334 }
 
 count
 match 19