[OpenWrt-Devel] incorrect commit for dnsmasq (dnsmasq: use "hostsdir" instead of "addn-hosts")

Hans Dedecker dedeckeh at gmail.com
Thu May 24 11:00:54 EDT 2018


On Thu, May 24, 2018 at 4:16 PM e9hack <e9hack at gmail.com> wrote:

> Am 24.05.2018 um 09:16 schrieb Hans Dedecker:
> >> possible and must not load hostfiles from other instances. The entry in
> >> dnsmasq.init must be:
> >
> >> xappend "--addn-hosts=$HOSTFILE"
> > Making such a change will break the host entries learned via odhcpd as
the
> > entires are put into the odhcpd file residing in the /tmp/hosts dir

> For running two instances of dnsmasq, this is a must have. If two
instances of dnsmasq are running, than you will hide
> some informations between the instances. In this case you can't use
odhcpd or can it use for the interfaces of one
> dnsmasq instance only. In my configuration, the first dnsmasq instance
provides dhcp v4 and dns caching for a network
> with tor access only. The second instance is used for the common things
for all other networks (dhcp v4, statefull dhcp
> v6 for link local addresses, dns resolver, dnssec ...). Odhcpd is for
stateless dhcp v6 for the networks of the second
> instance only. Odhcpd doesn't create a hostfile, so I don't see this
issue.
That's not correct; odhcpd populates the odhcp file in /tmp/hosts with
hostname IPv6 address entries it has learned via statefull DHCPv6.
While I agree the current solution is not correct for multiple dnsmasq
instances; the above proposed solution will break the hostname entries
learned via odhcpd

Hans

> A solution may be, to use different hosts directories for every dnsmasq
instance.

> Regards,
> Hartmut

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
http://lists.infradead.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list