Commit edeeae9d authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰
Browse files

[5514] Change after review:

 - the opion-space check removed from DHCPv4 similar to DHCPv6
parent 80634745
...@@ -533,10 +533,12 @@ size_t LibDHCP::unpackOptions4(const OptionBuffer& buf, ...@@ -533,10 +533,12 @@ size_t LibDHCP::unpackOptions4(const OptionBuffer& buf,
OptionDefContainerTypeRange range; OptionDefContainerTypeRange range;
// Number of option definitions returned. // Number of option definitions returned.
size_t num_defs = 0; size_t num_defs = 0;
if (option_space == DHCP4_OPTION_SPACE) {
range = idx.equal_range(opt_type); // Previously we did the lookup only for "dhcp4" option space, but there
num_defs = distance(range.first, range.second); // may be standard options in other spaces (e.g. radius). So we now do
} // the lookup for every space.
range = idx.equal_range(opt_type);
num_defs = distance(range.first, range.second);
// Standard option definitions do not include the definition for // Standard option definitions do not include the definition for
// our option or we're searching for non-standard option. Try to // our option or we're searching for non-standard option. Try to
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment