summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomek Mrugalski <tomasz@isc.org>2016-08-24 14:51:19 +0200
committerTomek Mrugalski <tomasz@isc.org>2016-08-24 14:51:19 +0200
commit64ecfcb9a24f655be351463d339ed561ab60364b (patch)
tree29b81a857abad7f8be28cef72e3d1e433a15b3ae
parent[4626] class parser updated to handle next-server, server-name and boot-file-... (diff)
downloadkea-64ecfcb9a24f655be351463d339ed561ab60364b.tar.xz
kea-64ecfcb9a24f655be351463d339ed561ab60364b.zip
[4626] setFixedFields called for Discover, Request and InfRequest
-rw-r--r--src/bin/dhcp4/dhcp4_srv.cc12
1 files changed, 12 insertions, 0 deletions
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