2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-09-03 07:25:18 +00:00

[519-dhcp-server-response-an-empty-rai-field] Added the bad RAI case

This commit is contained in:
Francis Dupont
2019-03-09 19:24:07 +01:00
parent d3f51876ca
commit f3563396d2
4 changed files with 110 additions and 1 deletions

View File

@@ -285,8 +285,9 @@ Dhcpv4Exchange::copyDefaultOptions() {
}
// If this packet is relayed, we want to copy Relay Agent Info option
// when it is not empty.
OptionPtr rai = query_->getOption(DHO_DHCP_AGENT_OPTIONS);
if (rai) {
if (rai && (rai->len() > Option::OPTION4_HDR_LEN)) {
resp_->addOption(rai);
}