]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5514] Change after review: trac5514
authorTomek Mrugalski <tomasz@isc.org>
Wed, 31 Jan 2018 13:38:11 +0000 (14:38 +0100)
committerTomek Mrugalski <tomasz@isc.org>
Wed, 31 Jan 2018 13:38:11 +0000 (14:38 +0100)
 - the opion-space check removed from DHCPv4 similar to DHCPv6

src/lib/dhcp/libdhcp++.cc

index 88d86d7ea664088b4886ac293e07c535e674c8ab..da85930362d4f8e141023694577e6bd3cb0a9900 100644 (file)
@@ -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