[Dnsmasq-discuss] reload resets connection on another interface?
Simon Kelley
simon at thekelleys.org.uk
Thu Aug 30 14:21:43 BST 2012
On 23/08/12 21:46, Rick DeNatale wrote:
> I'm trying to write an appliance machine to provide a configurable dhcp server in a virtual machine network.
>
> The machine has two network interfaces, eth0 is the 'wan' interface, eth1 is a vlan with machines getting statically assigned ip addresses from dnsmasq.
>
> I have a rest-interface served on the eth0 interface which takes requests to reserve an ipaddress for a given hardware address. The rest server rewrites the dhcp_hosts file and sends dnsmasq a SIGHUP to get it to reload.
>
> This is all working pretty well, except that if I send the SIGHUP from the rest server, the connection on eth0 is being reset and the client never gets the response to it's http request.
>
> I'm not sure what dnsmasq is doing to cause this, but it definitely happens during the reload. I've got an ugly workaround which sends the signal on another thread after sleeping 0.1 second but I'd rather not do that.
>
> FWIW here's my dnsmasq config:
>
> $ cat /etc/dnsmasq.conf
> conf-dir=/etc/dnsmasq.d
>
> $ cat /etc/dnsmasq.d/dhcp_appliance
> dhcp-hostsfile='/var/dhcp_appliance/dhcp_hosts'
> no-hosts
> listen-address=192.168.0.1
> interface=eth1
> except-interface=lo
> dhcp-range=198.162.0.0,static
>
> Any ideas?
None. sending SIGHUP to dnsmasq shouldn't affect other processes. I
suggest trying to find out exactly what's happening to the REST server.
Simon.
More information about the Dnsmasq-discuss
mailing list