[Dnsmasq-discuss] Add address file option
Don Muller
don at djmuller.com
Thu Mar 4 19:32:29 GMT 2010
> -----Original Message-----
> From: Simon Kelley [mailto:simon at thekelleys.org.uk]
> Sent: Thursday, March 04, 2010 5:15 AM
> To: Don Muller
> Cc: dnsmasq-discuss at lists.thekelleys.org.uk
> Subject: Re: [Dnsmasq-discuss] Add address file option
>
> Don Muller wrote:
> > Hi Simon,
> >
> >
> >
> > I have another suggestion that I hope you don't talk me out of J.
> >
> >
> >
> > In the config file or command line you can specify an IP address to
> > return for any host in the given domains via
> >
> >
> >
> > address=/<domain>/[domain/]<ipaddr>
> >
> >
> >
> > While this is nice, every time you add an entry you have to restart
> > dnsmasq. At least I think you do. I'd like to ask for the ability to
> > specify a file to read that contains these entries which will be
> reread
> > upon receipt of the SIGHUP signal.
> >
>
> This isn't as easy as it looks:
>
> address=/<domain>/<ipaddr>
>
> is a variant of
>
> server=/<domain>/<ipaddr>
>
> almost all of the code-paths are shared. There's a variant of the
> server= config
>
> server=/<domain>/<ipaddr>@<ipaddr>#<port>
>
> which allows specification of the local address and port. If the port
> is
> less than 1024, binding that needs root, hence it can't be done on a
> restart.
Well you could change the code to read from a file with the caveat the if
you are trying to bind to a port less than 1024 you have to do a restart.
>
> I'd be rather more inclined to extend the DBus interface, which allows
> dynamic setting of servers (but not source ports)
>
> I'm still bewildered why people are so allergic to restarting dnsmasq:
> it takes almost no time, doesn't disrupt existing connections and the
> only state lost is the cache, which is quickly and transparently
> replaced.
>
> Cheers,
>
> Simon.
More information about the Dnsmasq-discuss
mailing list