summaryrefslogtreecommitdiffstats
path: root/src/lib/dhcp
diff options
context:
space:
mode:
authorThomas Markwalder <tmark@isc.org>2018-12-20 19:33:42 +0100
committerThomas Markwalder <tmark@isc.org>2018-12-20 19:33:42 +0100
commitc6e2ee63016ba8d175c20e0b7fc625ab366e1021 (patch)
tree684ef55dd04fee589e48cc27b52eb52ff4db2760 /src/lib/dhcp
parent[#363, !177] kea-dhcp4 now emits message type option (53) first (diff)
downloadkea-c6e2ee63016ba8d175c20e0b7fc625ab366e1021.tar.xz
kea-c6e2ee63016ba8d175c20e0b7fc625ab366e1021.zip
[#363, !177] Addressed review comments
Diffstat (limited to 'src/lib/dhcp')
-rw-r--r--src/lib/dhcp/libdhcp++.h6
-rw-r--r--src/lib/dhcp/pkt4.cc2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/dhcp/libdhcp++.h b/src/lib/dhcp/libdhcp++.h
index 2f09840b1a..2d29f1474b 100644
--- a/src/lib/dhcp/libdhcp++.h
+++ b/src/lib/dhcp/libdhcp++.h
@@ -182,15 +182,15 @@ public:
/// and the Relay Agent Information option and END options last. This
/// function is initially called to pack the options for a packet in
/// @ref Pkt4::pack(). That call leads to it being called recursively in
- /// vai @ref Option::packOptions(). Thus the logic used to output the
+ /// @ref Option::packOptions(). Thus the logic used to output the
/// message type should only be executed by the top-most. This is governed
/// by the paramater top, below.
///
/// @param buf output buffer (assembled options will be stored here)
/// @param options collection of options to store to
/// @param top indicates if this is the first call to pack the options.
- /// When true logic to emit the message type is executed. It defaults to
- /// false.
+ /// When true logic to emit the message type first is executed. It
+ /// defaults to false.
static void packOptions4(isc::util::OutputBuffer& buf,
const isc::dhcp::OptionCollection& options,
bool top = false);
diff --git a/src/lib/dhcp/pkt4.cc b/src/lib/dhcp/pkt4.cc
index a354eb0bbe..73fc04cbc2 100644
--- a/src/lib/dhcp/pkt4.cc
+++ b/src/lib/dhcp/pkt4.cc
@@ -135,6 +135,8 @@ Pkt4::pack() {
// write DHCP magic cookie
buffer_out_.writeUint32(DHCP_OPTIONS_COOKIE);
+ // Call packOptions4() with parameter,"top", true. This invokes
+ // logic to emit the message type option first.
LibDHCP::packOptions4(buffer_out_, options_, true);
// add END option that indicates end of options