]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#363, !177] Addressed review comments 363-13966-dhcp-option-start-sequence
authorThomas Markwalder <tmark@isc.org>
Thu, 20 Dec 2018 18:33:42 +0000 (13:33 -0500)
committerThomas Markwalder <tmark@isc.org>
Thu, 20 Dec 2018 18:33:42 +0000 (13:33 -0500)
src/lib/dhcp/libdhcp++.h
src/lib/dhcp/pkt4.cc

index 2f09840b1aec11c107feec6fb78fbb5a18f2a21a..2d29f1474bae08a29fe460e270544d29c47dcbf9 100644 (file)
@@ -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);
index a354eb0bbe2771c3bcd3c1b314e720c088433c6a..73fc04cbc2a7e6dac9e8732cc9b1f2d560a3f5e2 100644 (file)
@@ -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