[Dnsmasq-discuss] Cannot override DHCP server-identifier (option 54) ?
simon at thekelleys.org.uk
Thu Dec 4 17:32:19 GMT 2014
-----BEGIN PGP SIGNED MESSAGE-----
On 03/12/14 10:04, Benjamin Picardat wrote:
> So I dug around a bit in the code, and I think my line in the
> configuration "dhcp-option=tag:eth2,54,192.168.0.10" is ignored
> because "server-identifier" is tagged OT_INTERNAL in opttab
> (options.c) and that makes it ignored in parse_dhcp_opt(char*,
> int). What is the semantic behind OT_INTERNAL ?
It marks options which are part of the core protocol, and shouldn't
have their values messed with by random configuration option. In other
words, it exists precisely to stop you doing what you're trying to do :)
> Would there be another way to do what I want to ? That is make that
> the option 54 is set to the secondary IP of the interface instead
> of the primary one.
The generic answer to all these sort of questions is "Use ISC dhcpd,
which implements the DHCP failover extension, dnsmasq doesn't, because
it's trying to be small and simple".
However, as you've got this far, I _think_, based on looking at the
code, rather then any testing, that adding
to the config will make dnsmasq use that address (the secondary in
your example), rather than the interface's primary address, for the
address for the server-id, default router, and a bunch of other stuff
you've not tripped over yet.
It would be interesting to know if that's enough to make a usable
> Sorry for the HTML in the previous message and sorry if I break the
> thread, not having received my own mail I cannot answer it and I do
> not know if setting the same title is enough to keep the message in
> the same thread.
> Thanks, Ben
> _______________________________________________ Dnsmasq-discuss
> mailing list Dnsmasq-discuss at lists.thekelleys.org.uk
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
-----END PGP SIGNATURE-----
More information about the Dnsmasq-discuss