From: Piotrek Zadroga Date: Thu, 16 Mar 2023 10:31:38 +0000 (+0100) Subject: [#939] Refactor header includes X-Git-Tag: Kea-2.3.6~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=55242bfa00b4dcae0572ba286ded531ab3f4be8c;p=thirdparty%2Fkea.git [#939] Refactor header includes --- diff --git a/src/lib/dhcp/option_definition.cc b/src/lib/dhcp/option_definition.cc index 2dd86cbbe9..7a37587cc4 100644 --- a/src/lib/dhcp/option_definition.cc +++ b/src/lib/dhcp/option_definition.cc @@ -669,12 +669,12 @@ OptionDefinition::writeToBuffer(Option::Universe u, return; case OPT_TUPLE_TYPE: { - OpaqueDataTuple::LengthFieldType lft; - if (getCode() == DHO_V4_SZTP_REDIRECT) { - lft = OpaqueDataTuple::LENGTH_2_BYTES; - } else { - lft = OptionDataTypeUtil::getTupleLenFieldType(u); - } + // In case of V4_SZTP_REDIRECT option #143, bootstrap-server-list is formatted + // as a list of tuples "uri-length;URI" where uri-length is coded on 2 octets, + // which is not typical for V4 Universe. + OpaqueDataTuple::LengthFieldType lft = getCode() == DHO_V4_SZTP_REDIRECT + ? OpaqueDataTuple::LENGTH_2_BYTES + : OptionDataTypeUtil::getTupleLenFieldType(u); OptionDataTypeUtil::writeTuple(value, lft, buf); return; } diff --git a/src/lib/dhcp/option_opaque_data_tuples.h b/src/lib/dhcp/option_opaque_data_tuples.h index 7d817359ab..6bf579f2cb 100644 --- a/src/lib/dhcp/option_opaque_data_tuples.h +++ b/src/lib/dhcp/option_opaque_data_tuples.h @@ -13,7 +13,7 @@ #include #include #include -#include "option_data_types.h" +#include #include namespace isc { diff --git a/src/lib/dhcp/option_vendor_class.h b/src/lib/dhcp/option_vendor_class.h index 71a73e9932..d0bc1480a3 100644 --- a/src/lib/dhcp/option_vendor_class.h +++ b/src/lib/dhcp/option_vendor_class.h @@ -13,7 +13,7 @@ #include #include #include -#include "option_data_types.h" +#include #include namespace isc {