Subject: [Infoblox] DHCP Bug in parsing options with encapsulated values MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Disposition: inline X-RT-Interface: Web Message-ID: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: binary X-RT-Original-Encoding: utf-8 X-RT-Encrypt: 0 X-RT-Sign: 0 Content-Length: 1337 Ramesh Damodaran (of Infoblox) writes, on Support #8404: The parse_option_buffer() function in options.c fails to add options with encapsulated values to the dhcp namespace. Option 82, relay-agent-information, is one such option that send encapsulated values. The sub-options within the encapsulated value are correctly added to the appropriate option universe but the main option is not added to the dhcp universe. In the case of option 82 the sub-options are added to the agent option universe. This bug prevents classes with match statements such as 'if (exists relay-agent-information)' from correctly identifying clients that sent requests with the relay-agent-information option included. In all cases the clients are treated as if they did not send the relay-agent-information option. My proposed fix is to add an else clause that calls save_option_buffer() to the if statement starting on line 194 in common/options.c. Here's a diff with the proposed fix: --- options.c 2015-06-19 14:25:41.837564075 -0700 +++ options.c.fixed 2015-06-19 14:26:19.700626162 -0700 @@ -256,6 +256,10 @@ } } } + else { + save_option_buffer(universe, options, bp, bp->data + offset, len, code, 1); + } + option_dereference(&option, MDL); offset += len; } I've tested this and classes that failed to match relay-agent-information options now work.