Discussion:
[Dnsmasq-discuss] problem with loopback and 2.77test5
Bastian Bittorf
2017-05-10 10:56:31 UTC
Permalink
here the relevant things with recent lede-project.org

***@box:~ dnsmasq -v
Dnsmasq version 2.77test5 Copyright (c) 2000-2016 Simon Kelley
Compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP
no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-auth no-DNSSEC no-ID
loop-detect inotify

# kernel tested with non working version: 4.4.61
# kernel tested with working version 4.4.56

# this is repeating in syslog every 3 seconds:
Wed May 10 12:47:55 2017 daemon.warn dnsmasq-dhcp[21993]:
not using configured address 127.0.0.2 because it is in use by another host
Wed May 10 12:47:55 2017 daemon.info dnsmasq-dhcp[21993]:
DHCPDISCOVER(lo) 00:00:00:00:00:00 no address available

# here the exact same config which is working with 2.77test4:
***@box:~ :) cat /var/etc/dnsmasq.conf.cfg02411c
# auto-generated config file from /etc/config/dhcp
conf-file=/etc/dnsmasq.conf
dhcp-authoritative
localise-queries
read-ethers
expand-hosts
dhcp-script=/etc/dhcp-script.d/10dhcpscript
cache-size=1000
domain=internet
server=/internet/
server=8.8.8.8
except-interface=eth0.2
except-interface=wlan0-1
except-interface=wlan1-1
addn-hosts=/var/run/hosts_olsr
addn-hosts=/etc/local.hosts
dhcp-leasefile=/tmp/dhcp.leases
resolv-file=/tmp/resolv.conf.auto
dhcp-broadcast=tag:needs-broadcast
addn-hosts=/tmp/hosts
conf-dir=/tmp/dnsmasq.d
user=dnsmasq
group=dnsmasq

dhcp-host=00:00:00:00:00:00,127.0.0.2,lo-alias

bogus-priv
conf-file=/usr/share/dnsmasq/rfc6761.conf
dhcp-range=set:lan,10.63.22.98,10.63.22.110,255.255.255.240,48h
dhcp-range=set:mastergate,100.66.19.2,100.66.19.254,255.192.0.0,12h
dhcp-option=mastergate,3,100.64.0.1
dhcp-option=mastergate,6,100.64.0.1
no-dhcp-interface=eth0.2
dhcp-range=set:loopback,127.0.0.2,127.0.0.3,255.0.0.0,1h
# end-of-config


# on a working version i get a lease:
***@box:~ :) cat /tmp/dhcp.leases
1494416311 00:00:00:00:00:00 127.0.0.2 lo-alias *

we use this "strange" method, for checking if everything is
working and the lease gets renewed (and some hotplug scripts are
fired)

thanks & bye, bastian
Simon Kelley
2017-05-10 12:52:11 UTC
Permalink
I wonder if this is to do with the extension of the ping-test to more
cases. Please could you try adding

no-ping

to the config, and see if that improves things?


Cheers,

Simon.
Post by Bastian Bittorf
here the relevant things with recent lede-project.org
Dnsmasq version 2.77test5 Copyright (c) 2000-2016 Simon Kelley
Compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP
no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-auth no-DNSSEC no-ID
loop-detect inotify
# kernel tested with non working version: 4.4.61
# kernel tested with working version 4.4.56
not using configured address 127.0.0.2 because it is in use by another host
DHCPDISCOVER(lo) 00:00:00:00:00:00 no address available
# auto-generated config file from /etc/config/dhcp
conf-file=/etc/dnsmasq.conf
dhcp-authoritative
localise-queries
read-ethers
expand-hosts
dhcp-script=/etc/dhcp-script.d/10dhcpscript
cache-size=1000
domain=internet
server=/internet/
server=8.8.8.8
except-interface=eth0.2
except-interface=wlan0-1
except-interface=wlan1-1
addn-hosts=/var/run/hosts_olsr
addn-hosts=/etc/local.hosts
dhcp-leasefile=/tmp/dhcp.leases
resolv-file=/tmp/resolv.conf.auto
dhcp-broadcast=tag:needs-broadcast
addn-hosts=/tmp/hosts
conf-dir=/tmp/dnsmasq.d
user=dnsmasq
group=dnsmasq
dhcp-host=00:00:00:00:00:00,127.0.0.2,lo-alias
bogus-priv
conf-file=/usr/share/dnsmasq/rfc6761.conf
dhcp-range=set:lan,10.63.22.98,10.63.22.110,255.255.255.240,48h
dhcp-range=set:mastergate,100.66.19.2,100.66.19.254,255.192.0.0,12h
dhcp-option=mastergate,3,100.64.0.1
dhcp-option=mastergate,6,100.64.0.1
no-dhcp-interface=eth0.2
dhcp-range=set:loopback,127.0.0.2,127.0.0.3,255.0.0.0,1h
# end-of-config
1494416311 00:00:00:00:00:00 127.0.0.2 lo-alias *
we use this "strange" method, for checking if everything is
working and the lease gets renewed (and some hotplug scripts are
fired)
thanks & bye, bastian
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Bastian Bittorf
2017-05-10 13:11:23 UTC
Permalink
Post by Simon Kelley
I wonder if this is to do with the extension of the ping-test to more
cases. Please could you try adding
no-ping
to the config, and see if that improves things?
thank you - yes, that works...now the log shows:

dnsmasq-dhcp[28815]: DHCPREQUEST(lo) 127.0.0.2 00:00:00:00:00:00
dnsmasq-dhcp[28815]: DHCPACK(lo) 127.0.0.2 00:00:00:00:00:00 lo-alias
dnsmasq-dhcp[28815]: ARP-cache injection failed: Invalid argument

could it be, because 'loopback' is not arp-able?

bye, bastian
Simon Kelley
2017-05-10 14:22:34 UTC
Permalink
Yes. I'll look at putting code to suppress the ARP check. on loopback.

Cheers,

Simon.
Post by Bastian Bittorf
Post by Simon Kelley
I wonder if this is to do with the extension of the ping-test to more
cases. Please could you try adding
no-ping
to the config, and see if that improves things?
dnsmasq-dhcp[28815]: DHCPREQUEST(lo) 127.0.0.2 00:00:00:00:00:00
dnsmasq-dhcp[28815]: DHCPACK(lo) 127.0.0.2 00:00:00:00:00:00 lo-alias
dnsmasq-dhcp[28815]: ARP-cache injection failed: Invalid argument
could it be, because 'loopback' is not arp-able?
bye, bastian
Simon Kelley
2017-05-10 20:48:41 UTC
Permalink
Post by Bastian Bittorf
Post by Simon Kelley
I wonder if this is to do with the extension of the ping-test to more
cases. Please could you try adding
no-ping
to the config, and see if that improves things?
dnsmasq-dhcp[28815]: DHCPREQUEST(lo) 127.0.0.2 00:00:00:00:00:00
dnsmasq-dhcp[28815]: DHCPACK(lo) 127.0.0.2 00:00:00:00:00:00 lo-alias
dnsmasq-dhcp[28815]: ARP-cache injection failed: Invalid argument
could it be, because 'loopback' is not arp-able?
Actually, its the sort-of opposite. loopback seems to respond to any
address in 127.0.0.0/8 so you get a reply to an ICMP echo request from
any 127.0.0.0/8 address, even if the loopback interface doesn't
explicitly have that address

***@holly:~/dnsmasq/dnsmasq$ ifconfig lo
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:2194 errors:0 dropped:0 overruns:0 frame:0
TX packets:2194 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:164612 (164.6 KB) TX bytes:164612 (164.6 KB)

***@holly:~/dnsmasq/dnsmasq$ ping 127.0.0.2
PING 127.0.0.2 (127.0.0.2) 56(84) bytes of data.
64 bytes from 127.0.0.2: icmp_seq=1 ttl=64 time=0.068 ms
64 bytes from 127.0.0.2: icmp_seq=2 ttl=64 time=0.065 ms
^C
--- 127.0.0.2 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms

I'll patch it to suppress ping-checks for the loopback interface.

Cheers,

Simon.
Simon Kelley
2017-05-10 21:31:10 UTC
Permalink
Just committed a patch which should make this work again without needing
--no-ping.

I've tagged it as 2.77rc2, so please could a LEDE package be built, and
this behaviour tested.


Cheers,


Simon.
Post by Bastian Bittorf
Post by Simon Kelley
I wonder if this is to do with the extension of the ping-test to more
cases. Please could you try adding
no-ping
to the config, and see if that improves things?
dnsmasq-dhcp[28815]: DHCPREQUEST(lo) 127.0.0.2 00:00:00:00:00:00
dnsmasq-dhcp[28815]: DHCPACK(lo) 127.0.0.2 00:00:00:00:00:00 lo-alias
dnsmasq-dhcp[28815]: ARP-cache injection failed: Invalid argument
could it be, because 'loopback' is not arp-able?
bye, bastian
Kevin Darbyshire-Bryant
2017-05-11 14:49:37 UTC
Permalink
Post by Simon Kelley
Just committed a patch which should make this work again without needing
--no-ping.
I've tagged it as 2.77rc2, so please could a LEDE package be built, and
this behaviour tested.
I tried rc2 and think there's a problem with DHCPv4 leases....ie. It
doesn't give them out any more.

It was a *very* quick test before I had to dash out of the door so not
exactly thorough.
Kevin Darbyshire-Bryant
2017-05-11 20:16:46 UTC
Permalink
Oops. "It compiles - ship it" bites back.
2.77rc3 fixes this, and we're currently eating the dog-food chez Kelley.
Woof!


Currently building a LEDE release, assuming no obvious issue pops up, a
pull request into LEDE master will follow...and then...the world :-)

Kevin
Bastian Bittorf
2017-05-15 10:06:51 UTC
Permalink
Oops. "It compiles - ship it" bites back.
2.77rc3 fixes this, and we're currently eating the dog-food chez Kelley.
just to mention it, the loopback-thingy is working fine now on my side with rc3.
Thanks a lot!

bye, bastian
Kevin Darbyshire-Bryant
2017-05-15 10:20:59 UTC
Permalink
Post by Bastian Bittorf
Oops. "It compiles - ship it" bites back.
2.77rc3 fixes this, and we're currently eating the dog-food chez Kelley.
just to mention it, the loopback-thingy is working fine now on my side with rc3.
Thanks a lot!
Cheers Bastian,

To confirm, no obvious screaming in LEDEland with rc3, in fact the 'DS
queries' fix has solved at least 2 reports of SIGSEGV. That's good news
I think.

Kevin
Simon Kelley
2017-05-20 20:46:30 UTC
Permalink
Post by Kevin Darbyshire-Bryant
Post by Bastian Bittorf
Oops. "It compiles - ship it" bites back.
2.77rc3 fixes this, and we're currently eating the dog-food chez Kelley.
just to mention it, the loopback-thingy is working fine now on my side with rc3.
Thanks a lot!
Cheers Bastian,
To confirm, no obvious screaming in LEDEland with rc3, in fact the 'DS
queries' fix has solved at least 2 reports of SIGSEGV. That's good news
I think.
Kevin
This is all good. I've made a (hopefully) last rc4, mainly because none
of the others have actually been formally announced. If nobody screams
in a few days. 2.77 is go.

I just realised that the anniversary of the release of 2.76 was couple
of days ago. A year between releases in unprecedented.


Cheers,

Simon.

Continue reading on narkive:
Loading...