[Dnsmasq-discuss] dnsmasq fails to handle a dynamic interface that goes and comes back

Sergei Zhirikov sfzhi at yahoo.com
Fri Jun 8 19:42:52 BST 2012


Hi,

I'm observing strange behaviour of dnsmasq that looks like a bug:

Software:
	dnsmasq-2.61 running without "bind-interfaces" option
	openvpn-2.2.2 in server mode with tap interface (tap0)

Sequence of events:
1. dnsmasq is started (tap0 interface does not exist yet)
2. openvpn is started (this creates tap0 interface)
3. a remote openvpn client connects and attempts to obtain an IP address 
via DHCP - this works fine
4. openvpn is stopped (tap0 interface disappears)
5. openvpn is started (tap0 interface comes back)
6. a remote openvpn client connects and attempts to obtain an IP address 
via DHCP - this fails (the client gets no response)
7. dnsmasq is restarted
6. a remote openvpn client connects and attempts to obtain an IP address 
via DHCP - this works again

During the step 6 dnsmasq logs that it receives DHCPDISCOVER and sends 
DHCPOFFER, but monitoring the interface with tcpdump shows only incoming 
DHCPDISCOVER and no response of any kind going out.

It looks like when the tap interface appears for the first time while 
dnsmasq is running it is handled correctly, but when the interface 
disappears and reappears dnsmasq somehow gets confused and does 
something wrong so that the response is not sent while dnsmasq believes 
it is.

I'm wondering if anyone can reproduce this behaviour.
--
Kind regards.
Sergei.




More information about the Dnsmasq-discuss mailing list