]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#939] Refactor header includes
authorPiotrek Zadroga <piotrek@isc.org>
Thu, 16 Mar 2023 10:31:38 +0000 (11:31 +0100)
committerPiotrek Zadroga <piotrek@isc.org>
Thu, 23 Mar 2023 13:51:23 +0000 (14:51 +0100)
src/lib/dhcp/option_definition.cc
src/lib/dhcp/option_opaque_data_tuples.h
src/lib/dhcp/option_vendor_class.h

index 2dd86cbbe92fa0ec30db59165ee567b61012be2b..7a37587cc4d17741345dba46aa77d5c256c81fed 100644 (file)
@@ -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;
     }
index 7d817359ab9791c56c82ae0b23439c61187ac5b7..6bf579f2cbb5bee63906ba114e7b297274f01c2f 100644 (file)
@@ -13,7 +13,7 @@
 #include <dhcp/option.h>
 #include <util/buffer.h>
 #include <boost/shared_ptr.hpp>
-#include "option_data_types.h"
+#include <dhcp/option_data_types.h>
 #include <stdint.h>
 
 namespace isc {
index 71a73e99329f7ca8989926f49e04ed48187d35e2..d0bc1480a3b555804e33e94dc444ae1b4aa265e1 100644 (file)
@@ -13,7 +13,7 @@
 #include <dhcp/option.h>
 #include <util/buffer.h>
 #include <boost/shared_ptr.hpp>
-#include "option_data_types.h"
+#include <dhcp/option_data_types.h>
 #include <stdint.h>
 
 namespace isc {