Carlos Carvalho wrote:
Back in June when 2.40 was at test12 and --dhcp-hostsfile was
introduced I said that I also need to re-read dhcp options. Here's
what Simon said:
>>
>http://www.thekelleys.org.uk/dnsmasq/test-releases/dnsmasq-2.40test12.tar.gz
>> >
>> >has this code: see the --dhcp-hostsfile switch.
>>
>> Unfortunately that's not enough :-( :-( It only allows one to read
>> dhcp-host declarations but it's also necessary to allow dhcp-option
>> specifications. My dhcp-hosts file consists of a series of
>>
>> dhcp-host=name,MAC,id:*,net:name
>> dhcp-option=name,vl7,3,router-ip
>> some other options
>>
>> Allowing changes to the host declaration only is somewhat restrictive...
>
>There's a limit as to what can be changed on the fly: depending on how
>data structures get used. (When re-reading a file it's first necessary
>to remove stuff which came from the last read: if that's in use
>elsewhere it all breaks....)
>> Also I'd need to re-read addn-hosts, like it's done with /etc/hosts.
This I can do without but it'd be good for completeness (and symmetry).
That's already there, I think.
>It's probably possible to do options, dhcp-range is not possible.
Agreed about dhcp-range. However having the possibility to re-read the
options would be very useful here because it'd reduce the number of
restarts by a factor of 10 at least.
So you can consider this as a feature request :-)
Ack: I'll have a think about it.
I'm coming back to this subject because of the possibility of using
dnsmasq for the central server. Presently it has all names in
/etc/hosts and dnsmasq is used only for client queries (because of
its wonderful localization feature). The problem is that a few
machines can take a different IP depending on the location. Since
Simon observed a few days ago that dnsmasq can handle this, I'd like
to remove the clients from /etc/hosts and make the central server also
use dnsmasq. And then I'd not like to restart it often...
Cheers,
Simon.
Simon.