From: Alan T. DeKok Date: Tue, 29 Jul 2025 17:11:00 +0000 (-0400) Subject: move DHCPv6 to use FR_TYPE_ATTR X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4a47a0ebe57d79f26c5ccd42dc37e629a59b68d;p=thirdparty%2Ffreeradius-server.git move DHCPv6 to use FR_TYPE_ATTR --- diff --git a/share/dictionary/dhcpv6/dictionary.rfc3315 b/share/dictionary/dhcpv6/dictionary.rfc3315 index bc349e8e6b..ad782d627e 100644 --- a/share/dictionary/dhcpv6/dictionary.rfc3315 +++ b/share/dictionary/dhcpv6/dictionary.rfc3315 @@ -59,7 +59,7 @@ MEMBER Preferred-Lifetime time_delta MEMBER Valid-Lifetime time_delta MEMBER Options group -ATTRIBUTE Option-Request 6 uint16 array # Magic option listing requested options +ATTRIBUTE Option-Request 6 attribute array ATTRIBUTE Preference 7 uint8 ATTRIBUTE Elapsed-Time 8 uint16 diff --git a/src/protocols/dhcpv6/base.c b/src/protocols/dhcpv6/base.c index 44ded420fa..e823e74049 100644 --- a/src/protocols/dhcpv6/base.c +++ b/src/protocols/dhcpv6/base.c @@ -62,7 +62,7 @@ fr_dict_attr_autoload_t libfreeradius_dhcpv6_dict_attr[] = { { .out = &attr_relay_link_address, .name = "Relay-Link-Address", .type = FR_TYPE_IPV6_ADDR, .dict = &dict_dhcpv6 }, { .out = &attr_relay_peer_address, .name = "Relay-Peer-Address", .type = FR_TYPE_IPV6_ADDR, .dict = &dict_dhcpv6 }, { .out = &attr_relay_message, .name = "Relay-Message", .type = FR_TYPE_GROUP, .dict = &dict_dhcpv6 }, - { .out = &attr_option_request, .name = "Option-Request", .type = FR_TYPE_UINT16, .dict = &dict_dhcpv6 }, + { .out = &attr_option_request, .name = "Option-Request", .type = FR_TYPE_ATTR, .dict = &dict_dhcpv6 }, { NULL } }; @@ -899,9 +899,6 @@ void fr_dhcpv6_print_hex(FILE *fp, uint8_t const *packet, size_t packet_len) int fr_dhcpv6_global_init(void) { - fr_dict_attr_t const *child; - fr_value_box_t value = *fr_box_uint16(0); - if (instance_count > 0) { instance_count++; return 0; @@ -920,22 +917,6 @@ int fr_dhcpv6_global_init(void) goto fail; } - /* - * Fixup dictionary entry for DHCP-Paramter-Request-List adding all the options - */ - child = NULL; - while ((child = fr_dict_attr_iterate_children(fr_dict_root(dict_dhcpv6), &child)) != NULL) { - if (child->flags.internal) continue; - - value.vb_uint16 = child->attr; - - if (fr_dict_enum_add_name(fr_dict_attr_unconst(attr_option_request), - child->name, &value, true, false) < 0) { - fr_dict_autofree(libfreeradius_dhcpv6_dict); - goto fail; - } - } - instantiated = true; return 0; } @@ -983,6 +964,11 @@ static bool attr_valid(fr_dict_attr_t *da) return false; } + if ((da->type == FR_TYPE_ATTR) && !da->parent->flags.is_root) { + fr_strerror_const("Data type 'attr' can only exist at the dictionary root"); + return false; + } + da->flags.is_known_width = true; return true; diff --git a/src/protocols/dhcpv6/decode.c b/src/protocols/dhcpv6/decode.c index b52d225a31..962463de50 100644 --- a/src/protocols/dhcpv6/decode.c +++ b/src/protocols/dhcpv6/decode.c @@ -78,6 +78,32 @@ static ssize_t decode_value(TALLOC_CTX *ctx, fr_pair_list_t *out, FR_PROTO_HEX_DUMP(data, data_len, "decode_value"); switch (parent->type) { + case FR_TYPE_ATTR: + /* + * Force the length of the data to be two, + * otherwise the "from network" call complains. + * Because we pass in the enumv as the _parent_ + * and not the da. The da is marked as "array", + * but the parent is not. + */ + if (data_len < 2) goto raw; + + fr_assert(parent->parent->flags.is_root); + + vp = fr_pair_afrom_da(ctx, parent); + if (!vp) return PAIR_DECODE_OOM; + + slen = fr_value_box_from_network(vp, &vp->data, vp->vp_type, parent->parent, + &FR_DBUFF_TMP(data, 2), 2, true); + if (slen <= 0) { + TALLOC_FREE(vp); + goto raw; + } + + vp->vp_tainted = true; + fr_pair_append(out, vp); + return 2; + /* * Address MAY be shorter than 16 bytes. */ diff --git a/src/protocols/dhcpv6/encode.c b/src/protocols/dhcpv6/encode.c index 94deb358b8..f1b1cd6985 100644 --- a/src/protocols/dhcpv6/encode.c +++ b/src/protocols/dhcpv6/encode.c @@ -116,6 +116,10 @@ static ssize_t encode_value(fr_dbuff_t *dbuff, } switch (vp->vp_type) { + case FR_TYPE_ATTR: + FR_DBUFF_IN_RETURN(&work_dbuff, (uint16_t) vp->vp_attr->attr); + break; + case FR_TYPE_TLV: case FR_TYPE_VENDOR: case FR_TYPE_VSA: diff --git a/src/tests/unit/protocols/dhcpv6/packet_client_server.txt b/src/tests/unit/protocols/dhcpv6/packet_client_server.txt index 7ebb83b430..3b650c8512 100644 --- a/src/tests/unit/protocols/dhcpv6/packet_client_server.txt +++ b/src/tests/unit/protocols/dhcpv6/packet_client_server.txt @@ -27,11 +27,11 @@ fuzzer-out dhcpv6 # Client Identifier # Elapsed time # -encode-proto Packet-Type = Solicit, Transaction-ID = 0xabcdef, Rapid-Commit = yes, IA-NA.IAID = 180150000, IA-NA.T1 = 54093, IA-NA.T2 = 45887, IA-NA.Options = { Option-Request = 0xad }, Client-FQDN.Reserved = 0, Client-FQDN.No-Server-Update = yes, Client-FQDN.Server-Override = no, Client-FQDN.Server-Update = no, Client-FQDN.Domain-Name = "tapioca01", Option-Request = DNS-Servers, Option-Request = Domain-List, Option-Request = NTP-Server, Option-Request = SNTP-Servers, Option-Request = Rapid-Commit, Client-ID.DUID = UUID, Client-ID.DUID.UUID.Value = 0x000102030405060708090a0b0c0d0e0f, Elapsed-Time = 45887 +encode-proto Packet-Type = Solicit, Transaction-ID = 0xabcdef, Rapid-Commit = yes, IA-NA.IAID = 180150000, IA-NA.T1 = 54093, IA-NA.T2 = 45887, IA-NA.Options = { Option-Request = 0xad }, Client-FQDN.Reserved = 0, Client-FQDN.No-Server-Update = yes, Client-FQDN.Server-Override = no, Client-FQDN.Server-Update = no, Client-FQDN.Domain-Name = "tapioca01", Option-Request = ::DNS-Servers, Option-Request = ::Domain-List, Option-Request = ::NTP-Server, Option-Request = ::SNTP-Servers, Option-Request = ::Rapid-Commit, Client-ID.DUID = UUID, Client-ID.DUID.UUID.Value = 0x000102030405060708090a0b0c0d0e0f, Elapsed-Time = 45887 match 01 ab cd ef 00 0e 00 00 00 03 00 12 0a bc de f0 00 00 d3 4d 00 00 b3 3f 00 06 00 02 00 ad 00 27 00 0b 04 09 74 61 70 69 6f 63 61 30 31 00 06 00 0a 00 17 00 18 00 38 00 1f 00 0e 00 01 00 12 00 04 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 00 08 00 02 b3 3f decode-proto - -match Packet-Type = ::Solicit, Transaction-ID = 0xabcdef, Rapid-Commit = yes, IA-NA = { IAID = 180150000, T1 = 54093, T2 = 45887, Options = { Option-Request = 173 } }, Client-FQDN = { Reserved = 0, No-Server-Update = yes, Server-Override = no, Server-Update = no, Domain-Name = "tapioca01" }, Option-Request = ::DNS-Servers, Option-Request = ::Domain-List, Option-Request = ::NTP-Server, Option-Request = ::SNTP-Servers, Option-Request = ::Rapid-Commit, Client-ID = { DUID = ::UUID, DUID.UUID = { Value = 0x000102030405060708090a0b0c0d0e0f } }, Elapsed-Time = 45887 +match Packet-Type = ::Solicit, Transaction-ID = 0xabcdef, Rapid-Commit = yes, IA-NA = { IAID = 180150000, T1 = 54093, T2 = 45887, Options = { Option-Request = ::173 } }, Client-FQDN = { Reserved = 0, No-Server-Update = yes, Server-Override = no, Server-Update = no, Domain-Name = "tapioca01" }, Option-Request = ::DNS-Servers, Option-Request = ::Domain-List, Option-Request = ::NTP-Server, Option-Request = ::SNTP-Servers, Option-Request = ::Rapid-Commit, Client-ID = { DUID = ::UUID, DUID.UUID = { Value = 0x000102030405060708090a0b0c0d0e0f } }, Elapsed-Time = 45887 encode-proto - match 01 ab cd ef 00 0e 00 00 00 03 00 12 0a bc de f0 00 00 d3 4d 00 00 b3 3f 00 06 00 02 00 ad 00 27 00 0b 04 09 74 61 70 69 6f 63 61 30 31 00 06 00 0a 00 17 00 18 00 38 00 1f 00 0e 00 01 00 12 00 04 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 00 08 00 02 b3 3f @@ -53,7 +53,7 @@ encode-proto Packet-Type = Advertise, Transaction-ID = 0xabcdef, Rapid-Commit = match 02 ab cd ef 00 0e 00 00 00 02 00 12 00 04 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 00 01 00 12 00 04 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 00 52 00 04 dd cc bb aa 00 17 00 20 28 04 01 4d 2a 73 44 ab 00 00 00 00 00 00 01 23 28 04 01 4d 2a 73 44 ab 00 00 00 00 00 00 04 56 00 18 00 31 09 6d 79 64 6f 6d 61 69 6e 31 03 63 6f 6d 00 09 6d 79 64 6f 6d 61 69 6e 32 03 6c 61 6e 00 04 63 6f 72 70 09 6d 79 64 6f 6d 61 69 6e 33 02 63 6f 00 00 03 00 12 0a bc de f0 00 00 d3 4d 00 00 b3 3f 00 06 00 02 00 ad 00 05 00 1e fd 85 d2 bb 09 2c 00 01 74 ae 28 71 f5 6c 8d 94 00 00 00 78 00 01 51 80 00 06 00 02 00 ad decode-proto - -match Packet-Type = ::Advertise, Transaction-ID = 0xabcdef, Rapid-Commit = yes, Server-ID = { DUID = ::UUID, DUID.UUID = { Value = 0x000102030405060708090a0b0c0d0e0f } }, Client-ID = { DUID = ::UUID, DUID.UUID = { Value = 0x000102030405060708090a0b0c0d0e0f } }, SOL-Max-RT = 3721182122, DNS-Servers = 2804:14d:2a73:44ab::123, DNS-Servers = 2804:14d:2a73:44ab::456, Domain-List = "mydomain1.com", Domain-List = "mydomain2.lan", Domain-List = "corp.mydomain3.co", IA-NA = { IAID = 180150000, T1 = 54093, T2 = 45887, Options = { Option-Request = 173 } }, IA-Addr = { IPv6-Address = fd85:d2bb:92c:1:74ae:2871:f56c:8d94, Preferred-Lifetime = 120, Valid-Lifetime = 86400, Options = { Option-Request = 173 } } +match Packet-Type = ::Advertise, Transaction-ID = 0xabcdef, Rapid-Commit = yes, Server-ID = { DUID = ::UUID, DUID.UUID = { Value = 0x000102030405060708090a0b0c0d0e0f } }, Client-ID = { DUID = ::UUID, DUID.UUID = { Value = 0x000102030405060708090a0b0c0d0e0f } }, SOL-Max-RT = 3721182122, DNS-Servers = 2804:14d:2a73:44ab::123, DNS-Servers = 2804:14d:2a73:44ab::456, Domain-List = "mydomain1.com", Domain-List = "mydomain2.lan", Domain-List = "corp.mydomain3.co", IA-NA = { IAID = 180150000, T1 = 54093, T2 = 45887, Options = { Option-Request = ::173 } }, IA-Addr = { IPv6-Address = fd85:d2bb:92c:1:74ae:2871:f56c:8d94, Preferred-Lifetime = 120, Valid-Lifetime = 86400, Options = { Option-Request = ::173 } } encode-proto - match 02 ab cd ef 00 0e 00 00 00 02 00 12 00 04 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 00 01 00 12 00 04 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 00 52 00 04 dd cc bb aa 00 17 00 20 28 04 01 4d 2a 73 44 ab 00 00 00 00 00 00 01 23 28 04 01 4d 2a 73 44 ab 00 00 00 00 00 00 04 56 00 18 00 31 09 6d 79 64 6f 6d 61 69 6e 31 03 63 6f 6d 00 09 6d 79 64 6f 6d 61 69 6e 32 03 6c 61 6e 00 04 63 6f 72 70 09 6d 79 64 6f 6d 61 69 6e 33 02 63 6f 00 00 03 00 12 0a bc de f0 00 00 d3 4d 00 00 b3 3f 00 06 00 02 00 ad 00 05 00 1e fd 85 d2 bb 09 2c 00 01 74 ae 28 71 f5 6c 8d 94 00 00 00 78 00 01 51 80 00 06 00 02 00 ad @@ -71,11 +71,11 @@ match 02 ab cd ef 00 0e 00 00 00 02 00 12 00 04 00 01 02 03 04 05 06 07 08 09 0a # Client Identifier # Elapsed time # -encode-proto Packet-Type = Request, Transaction-ID = 0xc0ffee, Server-ID.DUID = UUID, Server-ID.DUID.UUID.Value = 0x000102030405060708090a0b0c0d0e0f, IA-NA.IAID = 180150000, IA-NA.T1 = 54093, IA-NA.T2 = 45887, IA-NA.Options = { Option-Request = 173 }, IA-Addr.IPv6-Address = fd85:d2bb:92c:1:74ae:2871:f56c:8d94, IA-Addr.Preferred-Lifetime = 120, IA-Addr.Valid-Lifetime = 86400, IA-Addr.Options = { Option-Request = 173 }, Client-FQDN.Reserved = 0, Client-FQDN.No-Server-Update = yes, Client-FQDN.Server-Override = no, Client-FQDN.Server-Update = no, Client-FQDN.Domain-Name = "tapioca01", Option-Request = DNS-Servers, Option-Request = Domain-List, Option-Request = NTP-Server, Option-Request = SNTP-Servers, Option-Request = Rapid-Commit, Client-ID.DUID = UUID, Client-ID.DUID.UUID.Value = 0x000102030405060708090a0b0c0d0e0f, Elapsed-Time = 45887 +encode-proto Packet-Type = Request, Transaction-ID = 0xc0ffee, Server-ID.DUID = UUID, Server-ID.DUID.UUID.Value = 0x000102030405060708090a0b0c0d0e0f, IA-NA.IAID = 180150000, IA-NA.T1 = 54093, IA-NA.T2 = 45887, IA-NA.Options = { Option-Request = 173 }, IA-Addr.IPv6-Address = fd85:d2bb:92c:1:74ae:2871:f56c:8d94, IA-Addr.Preferred-Lifetime = 120, IA-Addr.Valid-Lifetime = 86400, IA-Addr.Options = { Option-Request = 173 }, Client-FQDN.Reserved = 0, Client-FQDN.No-Server-Update = yes, Client-FQDN.Server-Override = no, Client-FQDN.Server-Update = no, Client-FQDN.Domain-Name = "tapioca01", Option-Request = ::DNS-Servers, Option-Request = ::Domain-List, Option-Request = ::NTP-Server, Option-Request = ::SNTP-Servers, Option-Request = ::Rapid-Commit, Client-ID.DUID = UUID, Client-ID.DUID.UUID.Value = 0x000102030405060708090a0b0c0d0e0f, Elapsed-Time = 45887 match 03 c0 ff ee 00 02 00 12 00 04 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 00 03 00 12 0a bc de f0 00 00 d3 4d 00 00 b3 3f 00 06 00 02 00 ad 00 05 00 1e fd 85 d2 bb 09 2c 00 01 74 ae 28 71 f5 6c 8d 94 00 00 00 78 00 01 51 80 00 06 00 02 00 ad 00 27 00 0b 04 09 74 61 70 69 6f 63 61 30 31 00 06 00 0a 00 17 00 18 00 38 00 1f 00 0e 00 01 00 12 00 04 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 00 08 00 02 b3 3f decode-proto - -match Packet-Type = ::Request, Transaction-ID = 0xc0ffee, Server-ID = { DUID = ::UUID, DUID.UUID = { Value = 0x000102030405060708090a0b0c0d0e0f } }, IA-NA = { IAID = 180150000, T1 = 54093, T2 = 45887, Options = { Option-Request = 173 } }, IA-Addr = { IPv6-Address = fd85:d2bb:92c:1:74ae:2871:f56c:8d94, Preferred-Lifetime = 120, Valid-Lifetime = 86400, Options = { Option-Request = 173 } }, Client-FQDN = { Reserved = 0, No-Server-Update = yes, Server-Override = no, Server-Update = no, Domain-Name = "tapioca01" }, Option-Request = ::DNS-Servers, Option-Request = ::Domain-List, Option-Request = ::NTP-Server, Option-Request = ::SNTP-Servers, Option-Request = ::Rapid-Commit, Client-ID = { DUID = ::UUID, DUID.UUID = { Value = 0x000102030405060708090a0b0c0d0e0f } }, Elapsed-Time = 45887 +match Packet-Type = ::Request, Transaction-ID = 0xc0ffee, Server-ID = { DUID = ::UUID, DUID.UUID = { Value = 0x000102030405060708090a0b0c0d0e0f } }, IA-NA = { IAID = 180150000, T1 = 54093, T2 = 45887, Options = { Option-Request = ::173 } }, IA-Addr = { IPv6-Address = fd85:d2bb:92c:1:74ae:2871:f56c:8d94, Preferred-Lifetime = 120, Valid-Lifetime = 86400, Options = { Option-Request = ::173 } }, Client-FQDN = { Reserved = 0, No-Server-Update = yes, Server-Override = no, Server-Update = no, Domain-Name = "tapioca01" }, Option-Request = ::DNS-Servers, Option-Request = ::Domain-List, Option-Request = ::NTP-Server, Option-Request = ::SNTP-Servers, Option-Request = ::Rapid-Commit, Client-ID = { DUID = ::UUID, DUID.UUID = { Value = 0x000102030405060708090a0b0c0d0e0f } }, Elapsed-Time = 45887 # # 4. Reply (Server -> Client) @@ -108,7 +108,7 @@ match Packet-Type = ::Reply, Transaction-ID = 0xc0ffee, Server-ID = { DUID = ::U # Elapsed time # Identity Association for Prefix Delegation # -encode-proto Packet-Type = Release, Transaction-ID = 0x00b33f, Client-ID.DUID = UUID, Client-ID.DUID.UUID.Value = 0x000102030405060708090a0b0c0d0e0f, Server-ID.DUID = UUID, Server-ID.DUID.UUID.Value = 0x000102030405060708090a0b0c0d0e0f, Option-Request = DNS-Servers, Option-Request = Domain-List, Elapsed-Time = 45887, IA-PD.IAID = 2864434397, IA-PD.T1 = 54093, IA-PD.T2 = 45887, IA-PD.Options = { Preference = 1 } +encode-proto Packet-Type = Release, Transaction-ID = 0x00b33f, Client-ID.DUID = UUID, Client-ID.DUID.UUID.Value = 0x000102030405060708090a0b0c0d0e0f, Server-ID.DUID = UUID, Server-ID.DUID.UUID.Value = 0x000102030405060708090a0b0c0d0e0f, Option-Request = ::DNS-Servers, Option-Request = ::Domain-List, Elapsed-Time = 45887, IA-PD.IAID = 2864434397, IA-PD.T1 = 54093, IA-PD.T2 = 45887, IA-PD.Options = { Preference = 1 } match 08 00 b3 3f 00 01 00 12 00 04 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 00 02 00 12 00 04 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 00 06 00 04 00 17 00 18 00 08 00 02 b3 3f 00 19 00 11 aa bb cc dd 00 00 d3 4d 00 00 b3 3f 00 07 00 01 01 decode-proto - diff --git a/src/tests/unit/protocols/dhcpv6/rfc8415.txt b/src/tests/unit/protocols/dhcpv6/rfc8415.txt index d566188689..455af16535 100644 --- a/src/tests/unit/protocols/dhcpv6/rfc8415.txt +++ b/src/tests/unit/protocols/dhcpv6/rfc8415.txt @@ -193,11 +193,11 @@ match Server-ID = { DUID = ::UUID, DUID.UUID = { Value = 0x000102030405060708090 # # IA_NA-options Options associated with this IA_NA. # -encode-pair IA-NA.IAID = 180150000, IA-NA.T1 = 54093, IA-NA.T2 = 45887, IA-NA.Options = { Option-Request = 173 } +encode-pair IA-NA.IAID = 180150000, IA-NA.T1 = 54093, IA-NA.T2 = 45887, IA-NA.Options = { Option-Request = ::173 } match 00 03 00 12 0a bc de f0 00 00 d3 4d 00 00 b3 3f 00 06 00 02 00 ad decode-pair - -match IA-NA = { IAID = 180150000, T1 = 54093, T2 = 45887, Options = { Option-Request = 173 } } +match IA-NA = { IAID = 180150000, T1 = 54093, T2 = 45887, Options = { Option-Request = ::173 } } # # 21.5. Identity Association for Temporary Addresses Option @@ -232,11 +232,11 @@ match IA-NA = { IAID = 180150000, T1 = 54093, T2 = 45887, Options = { Option-Req # # IA_TA-options Options associated with this IA_TA. # -encode-pair IA-TA.IAID = 3237998080, IA-TA.Options = { Option-Request = 173 } +encode-pair IA-TA.IAID = 3237998080, IA-TA.Options = { Option-Request = ::173 } match 00 04 00 0a c0 ff ee 00 00 06 00 02 00 ad decode-pair - -match IA-TA = { IAID = 3237998080, Options = { Option-Request = 173 } } +match IA-TA = { IAID = 3237998080, Options = { Option-Request = ::173 } } # # 21.6. IA Address Option @@ -291,7 +291,7 @@ match IA-TA = { IAID = 3237998080, Options = { Option-Request = 173 } } # variable-length field (24 octets less than # the value in the option-len field). # -encode-pair IA-Addr.IPv6-Address = fd85:d2bb:92c::74ae:2871:f56c:8d94, IA-Addr.Preferred-Lifetime = 120, IA-Addr.Valid-Lifetime = 86400, IA-Addr.Options = { Option-Request = 173 } +encode-pair IA-Addr.IPv6-Address = fd85:d2bb:92c::74ae:2871:f56c:8d94, IA-Addr.Preferred-Lifetime = 120, IA-Addr.Valid-Lifetime = 86400, IA-Addr.Options = { Option-Request = ::173 } match 00 05 00 1e fd 85 d2 bb 09 2c 00 00 74 ae 28 71 f5 6c 8d 94 00 00 00 78 00 01 51 80 00 06 00 02 00 ad # @@ -301,7 +301,7 @@ match 00 05 00 1e fd 85 d2 bb 09 2c 00 00 74 ae 28 71 f5 6c 8d 94 00 00 00 78 00 # We use a regex match to deal with the inconsistency. # decode-pair - -match-regex IA-Addr = \{ IPv6-Address = fd85:d2bb:92c:0{0,4}:74ae:2871:f56c:8d94, Preferred-Lifetime = 120, Valid-Lifetime = 86400, Options = \{ Option-Request = 173 \} \} +match-regex IA-Addr = \{ IPv6-Address = fd85:d2bb:92c:0{0,4}:74ae:2871:f56c:8d94, Preferred-Lifetime = 120, Valid-Lifetime = 86400, Options = \{ Option-Request = ::173 \} \} # # 21.7. Option Request Option @@ -331,7 +331,7 @@ match-regex IA-Addr = \{ IPv6-Address = fd85:d2bb:92c:0{0,4}:74ae:2871:f56c:8d94 # 2-octet field containing an unsigned # integer. # -encode-pair Option-Request = Unicast, Option-Request = IA-Addr +encode-pair Option-Request = ::Unicast, Option-Request = ::IA-Addr match 00 06 00 04 00 0c 00 05 decode-pair -