From edeeae9d4b157d93955353847d5c9d3475efd014 Mon Sep 17 00:00:00 2001 From: Tomek Mrugalski Date: Wed, 31 Jan 2018 14:38:11 +0100 Subject: [PATCH] [5514] Change after review: - the opion-space check removed from DHCPv4 similar to DHCPv6 --- src/lib/dhcp/libdhcp++.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/lib/dhcp/libdhcp++.cc b/src/lib/dhcp/libdhcp++.cc index 88d86d7ea6..da85930362 100644 --- a/src/lib/dhcp/libdhcp++.cc +++ b/src/lib/dhcp/libdhcp++.cc @@ -533,10 +533,12 @@ size_t LibDHCP::unpackOptions4(const OptionBuffer& buf, OptionDefContainerTypeRange range; // Number of option definitions returned. size_t num_defs = 0; - if (option_space == DHCP4_OPTION_SPACE) { - range = idx.equal_range(opt_type); - num_defs = distance(range.first, range.second); - } + + // Previously we did the lookup only for "dhcp4" option space, but there + // 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 // our option or we're searching for non-standard option. Try to -- 2.47.2