From: Tomek Mrugalski Date: Wed, 24 Aug 2016 12:51:19 +0000 (+0200) Subject: [4626] setFixedFields called for Discover, Request and InfRequest X-Git-Tag: trac4631_base~1^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64ecfcb9a24f655be351463d339ed561ab60364b;p=thirdparty%2Fkea.git [4626] setFixedFields called for Discover, Request and InfRequest --- diff --git a/src/bin/dhcp4/dhcp4_srv.cc b/src/bin/dhcp4/dhcp4_srv.cc index aabcda6697..5808f0f0e5 100644 --- a/src/bin/dhcp4/dhcp4_srv.cc +++ b/src/bin/dhcp4/dhcp4_srv.cc @@ -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