[Dnsmasq-discuss] Re: Support for DHCP option 125

Simon Kelley simon at thekelleys.org.uk
Fri Dec 5 21:41:15 GMT 2008

Samium Gromoff wrote:
> On Fri Sep 14 16:31:55 BST 2007, Simon Kelleys wrote:
>>The existing support for non-vendor-identifying encapsulated options is 
>>in two places. The data gets laid out in the packet in the second half 
>>of do_options() in src/rfc2131.c. That's quite hairy code, but it should 
>>be extendable to option 125 without too many problems.
>>dhcp-option lines in the config file and command line are parsed into a 
>>linked-list of struct dhcp_opt in parse_dhcp_opt() in src/option.c. 
>>That's hairy too (sorry!). option-60 encapsulated options look like:
>>dhcp-option=vendor:<some vendor string>,<option data>
>>That could be extended to cope with something like
>>dhcp-option=vendor-id:<enterprise-number>,<option data>
>>From: dnsmasq-discuss-request at lists.thekelleys.org.uk
>>Subject: Welcome to the "Dnsmasq-discuss" mailing list
>>Date: Thu, 04 Dec 2008 20:48:06 +0000
> I have implemented something along these lines, which, in effect, allows
> me to add following lines in dnsmasq.conf:
>   dhcp-option-force= net:iscsi-client0, net:gpxe, vendor-id:175, 190, "iscsi-client0"
>   dhcp-option-force= net:iscsi-client0, net:gpxe, vendor-id:175, 191, "iscsi-client0-secret"
> and have the username and password fed to gPXE for iSCSI boot.
> (Yes, I know, specifying those via DHCP is a recipe for a breaking.)
> The patch works in just that scenario for me, but is otherwise untested.

OK, this confused me for a while, until I realised that the subject is 
wrong. It has nothing to do with support for option 125 (as specified in 
RFC  3925) It looks like the gPXE folks have ignored that and gone their 
own merry way with option 175 to encapsulate their options. Yuck.

Your patch isn't really complete: it won't cope with more than one set 
of encapsulated options (with different custom numbers), and will even 
mix up ordinary vendor-class options with the custom-option-number ones.

Given what it's doing, I'd suggest a different keyword for this, maybe 
"encapsulate". It would also be good to get proper RFC 3925 support 
whilst the code is being worked on.

I'll take a further look at this when I get the chance.



More information about the Dnsmasq-discuss mailing list