Ubuntu

dnsmasq should ONLY bind the virtual interface, not hog the whole system

Reported by John Dong on 2008-12-12
4
Affects Status Importance Assigned to Milestone
dnsmasq (Ubuntu)
Medium
Unassigned

Bug Description

dnsmasq's DHCP server binds like

udp 0 0 *:bootps *:*

when being run by libvirt like
nobody 5726 0.0 0.0 14788 1040 ? S 10:14 0:00 dnsmasq --keep-in-foreground --strict-order --bind-interfaces --pid-file --conf-file --listen-address 192.168.122.1 --except-interface lo --dhcp-leasefile=/var/lib/libvirt/dhcp-default.leases --dhcp-range 192.168.122.2,192.168.122.254

The problem is that this means I cannot start up another dnsmasq DHCP instance for another interface. Does dnsmasq not listen to --listen-address in DHCP mode? For its DNS server it seems to be behaving well

Simon Kelley (simon-thekelleys) wrote :

Because a DHCP server has to cope with "strange" packets from unconfigured and half-configured clients, it's not possible always to bind the DHCP listening socket to an IP address. However, when --bind-interfaces is set, dnsmasq does set the SO_REUSEADDRESS flag on the socket, so that it is possible to run another instance of dnsmasq listening on another interface. For this to work ALL instances of dnsmasq have to have --bind-interfaces set, which may be the problem here.

Cheers,

Simon.

Chuck Short (zulcss) wrote :

I think this is more of a dnsmasq problem than a libvirt problem.

Regards
chuck

affects: libvirt (Ubuntu) → dnsmasq (Ubuntu)
Thierry Carrez (ttx) wrote :

John: please confirm that when running with bind-interfaces on all dnsmasq instances, it works.

Changed in dnsmasq (Ubuntu):
importance: Undecided → Medium
status: New → Incomplete
Thierry Carrez (ttx) wrote :

Forget that, this is a duplicate of bug 231060. There is support in dnsmasq for properly collaborating with libvirt. I'm not exactly sure if that was fixed in 9.04 libvirt or not.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers