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

2018-05-24 Thread Hans Dedecker
On Thu, May 24, 2018 at 4:16 PM e9hack  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@lists.openwrt.org
http://lists.infradead.org/mailman/listinfo/openwrt-devel


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

2018-05-24 Thread e9hack
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.

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

Regards,
Hartmut



___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.infradead.org/mailman/listinfo/openwrt-devel


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

2018-05-24 Thread Hans Dedecker
On Wed, May 23, 2018 at 11:43 PM e9hack  wrote:

> Hi,

> this commit and the way, who the init script handles hostfiles seams to
be completely wrong. The init script generates
> one independent hostfile per dnsmasq instance and writes it to a common
directory. Multiple dnsmasq instances are
> 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

Hans

> Than every dnsmasq instance loads the associated hostfile only.

> Regards,
> Hartmut

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.infradead.org/mailman/listinfo/openwrt-devel


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

2018-05-23 Thread Daniel Golle
Hi!

On Wed, May 23, 2018 at 11:43:31PM +0200, e9hack wrote:
> Hi,
> 
> this commit and the way, who the init script handles hostfiles seams to be 
> completely wrong. The init script generates
> one independent hostfile per dnsmasq instance and writes it to a common 
> directory. Multiple dnsmasq instances are
> possible and must not load hostfiles from other instances. The entry in 
> dnsmasq.init must be:
> 
> xappend "--addn-hosts=$HOSTFILE"
> 
> Than every dnsmasq instance loads the associated hostfile only.

I'm sure we can have both, use a hosts directory instead of a file and
have an individual directory for each instance. Wouldn't that resolve
your concerns and give us the best of both worlds?

Cheers

Daniel

> 
> Regards,
> Hartmut
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> http://lists.infradead.org/mailman/listinfo/openwrt-devel


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.infradead.org/mailman/listinfo/openwrt-devel


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

2018-05-23 Thread e9hack
Hi,

this commit and the way, who the init script handles hostfiles seams to be 
completely wrong. The init script generates
one independent hostfile per dnsmasq instance and writes it to a common 
directory. Multiple dnsmasq instances are
possible and must not load hostfiles from other instances. The entry in 
dnsmasq.init must be:

xappend "--addn-hosts=$HOSTFILE"

Than every dnsmasq instance loads the associated hostfile only.

Regards,
Hartmut

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
http://lists.infradead.org/mailman/listinfo/openwrt-devel