]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[4626] setFixedFields called for Discover, Request and InfRequest
authorTomek Mrugalski <tomasz@isc.org>
Wed, 24 Aug 2016 12:51:19 +0000 (14:51 +0200)
committerTomek Mrugalski <tomasz@isc.org>
Wed, 24 Aug 2016 12:51:19 +0000 (14:51 +0200)
src/bin/dhcp4/dhcp4_srv.cc

index aabcda6697cf90841fb8b41d0af0a16ca2229139..5808f0f0e59e55c37c9c8c8b25e86ceb8c45cacb 100644 (file)
@@ -2012,6 +2012,10 @@ Dhcpv4Srv::processDiscover(Pkt4Ptr& discover) {
         // them we append them for him.
         appendBasicOptions(ex);
 
+        // See if the class mandates setting any fixed fields (siaddr, sname,
+        // filename).
+        setFixedFields(ex);
+
     } else {
         // If the server can't offer an address, it drops the packet.
         return (Pkt4Ptr());
@@ -2067,6 +2071,10 @@ Dhcpv4Srv::processRequest(Pkt4Ptr& request) {
         // include in the response. If client did not request
         // them we append them for him.
         appendBasicOptions(ex);
+
+        // See if the class mandates setting any fixed fields (siaddr, sname,
+        // filename).
+        setFixedFields(ex);
     }
 
     // Set the src/dest IP address, port and interface for the outgoing
@@ -2352,6 +2360,10 @@ Dhcpv4Srv::processInform(Pkt4Ptr& inform) {
     appendBasicOptions(ex);
     adjustIfaceData(ex);
 
+    // See if the class mandates setting any fixed fields (siaddr, sname,
+    // filename).
+    setFixedFields(ex);
+
     // There are cases for the DHCPINFORM that the server receives it via
     // relay but will send the response to the client's unicast address
     // carried in the ciaddr. In this case, the giaddr and hops field should