2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-02 15:05:16 +00:00

[#1695] added support for RAI relay suboption 11 (RAI_OPTION_SERVER_ID_OVERRIDE)

This commit is contained in:
Razvan Becheriu
2022-02-14 15:45:29 +02:00
parent b54cdd0e9b
commit a6d13a60ff
3 changed files with 86 additions and 49 deletions

View File

@@ -3695,6 +3695,14 @@ Dhcpv4Srv::acceptServerId(const Pkt4Ptr& query) const {
return (false);
}
OptionPtr rai_option = query->getOption(DHO_DHCP_AGENT_OPTIONS);
if (rai_option) {
OptionPtr rai_suboption = rai_option->getOption(RAI_OPTION_SERVER_ID_OVERRIDE);
if (rai_suboption && (server_id.toBytes() == rai_suboption->toBinary())) {
return (true);
}
}
// This function iterates over all interfaces on which the
// server is listening to find the one which has a socket bound
// to the address carried in the server identifier option.