[Dnsmasq-discuss] DNSmasq should warn when using unsupported dhcp option

Simon Kelley simon at thekelleys.org.uk
Tue Mar 28 07:37:03 BST 2006


cuicui wrote:
> Hi everybody,
> 
> I'm new on this list, i use the dhcp side of dnsmasq on a private 
> network to manage 40 win2k computers with restricted access (and static 
> addressing).
> 
> Today i tried to use the #252 dhcp option that allow to (indirectly) 
> configure proxy options on workstations, this option doesn't give the 
> proxy adress/port but the URL of an auto-configuration script that gives 
> proxy settings.
> 
> dhcp-option=252,http://myserv.er/proxy.pac
> 
> It didn't work, so i made a network capture with Ethereal to see which 
> DHCP options were really send during the DHCP dialog and the #252 option 
> was missing.
> 
> After a quick look a the sources it *seems* that this option is not 
> implemented yet. As far as dnsmasq was starting fine even with a dhcp 
> configuration it didn't support, i think it could be a good idea to 
> write a warning to syslog in this kind of case, just to inform which 
> dhcp options will be dropped.
> 

There's no such thing as an unsupported DHCP option: dnsmasq parses the 
stuff to the right of the equals sign in "dhcp-option=" and turns it 
into a set of bytes which is sent. The most common data types are 
supported with code to turn them into bytes (ie strings, IP addresses) 
but with a few exceptions, the data type is determined from the data, 
not from the option number. In any case it's always possible to exactly 
control what is sent by giving the bytes directly in hex.

Did your DHCP client ask for the value of option 252?  Look for 
"requested options" in the DHCPDISCOVER and DHCPREQUEST packets. Most 
likely it isn't asking, which is why it doesn't get send. Windows often 
asks for WPAD info later, using a DHCPINFORM request. I assume that is 
generated by the browser, not the networking subsystem.

HTH

Simon.



More information about the Dnsmasq-discuss mailing list