force kea to send packets to specified address
Testing multiple subnets scenarios in the lab needs tweaks in kea and perfdhcp (covered by different issue)
There needs to be an easy way to force kea to alternate destination address of a generated packet. This change I made for recent testing:
diff --git a/src/bin/dhcp4/dhcp4_srv.cc b/src/bin/dhcp4/dhcp4_srv.cc
index f671fe3ae1..0141a8bfcd 100644
--- a/src/bin/dhcp4/dhcp4_srv.cc
+++ b/src/bin/dhcp4/dhcp4_srv.cc
@@ -2589,6 +2589,7 @@ Dhcpv4Srv::adjustRemoteAddr(Dhcpv4Exchange& ex) {
response->setRemoteAddr(query->getRemoteAddr());
}
+response->setRemoteAddr(query->getRemoteAddr());
}
void
this change should:
- have as small impact as possible on normal kea work
- easy to enable (preferably without recompilation)
- work for v4 and v6 ;)