The DHCP option parsing doesn't know about this option and can't cope
with it. The fallback is to just pass the value of the bytes which make
up the option  as hex, so for your example of


1,192.168.5.14

you'll need

dhcp-option-force=78,01:c0:a8:05:0e

It would be good to address such "mixed type" options, but that's for
future releases, the above is your only option for now.


Cheers,

Simon.


On 09/03/2020 12:09, Kristian Evensen wrote:
> Hello,
> 
> I am trying to configure dnsmasq to export DHCP option 78 (rfc2610) to
> the clients on my network, but I am struggling to make it work. My
> problems seems to be caused by the "Mandatory" byte that has to be
> part of the option.
> 
> My initial attempt was to add the following to dnsmasq.conf:
> dhcp-option-force=78,1,192.168.5.14
> 
> However, this caused dnsmasq to fail with the following error message:
> Mon Mar  9 11:55:55 2020 daemon.crit dnsmasq[3232]: bad IPv4 address
> at line 38 of /etc/dnsmasq.conf
> 
> I then tried to replace "1" with 0x01 and 1b, but in my packet capture
> I see that the values are sent as strings (so "0x01" and "1b"). I then
> tried to just add 1 (so dhcp-option-force=78,1), which worked in the
> sense that dnsmasq did not fail to start and an integer was sent to my
> client.
> 
> Has anyone managed to configure dnsmasq to export option 78 or know
> how to combine an integer with an address list? My router is running
> dnsmasq verson 2.80.
> 
> Thanks in advance for any help,
> Kristian
> 
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 

_______________________________________________
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss

Reply via email to