Network Access Point, dnsmasq should bind to only panX interface

Bug #336441 reported by Jack Coulter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
boot-repair-xubuntu (nUbuntu)
New
Undecided
Unassigned

Bug Description

When Network Access Point local service is enabled, and dnsmasq is used as the DHCP server, the --bind-interfaces option is not used, this causes the instance of dnsmasq created by Blueman to conflict with any other instances, even those listening on different interfaces.

This results in the following error:
"dnsmasq: failed to bind listening socket for ::1: Address already in use"

For example, virt-manager uses dnsmasq, but binds only to virbr0 and uses the --bind-interfaces and --except-interface=lo, and thus can coexist with dnsmasq running on other interfaces. I also have another instance of dnsmasq running and bound to eth0, wlan0 (again with --bind-interfaces), this coexists with the instance listening on virbr0.

The fix for this would be for blueman to pass --bind-interfaces and --except-interface=lo to dnsmasq.

Tags: patch
Revision history for this message
Valmantas Palikša (walmis) wrote :

weird, but it does that already.

blueman/main/NetConf.py line 356
return ("dnsmasq", "--dhcp-range=%s,%s,60m --dhcp-option=option:router,%s --interface=pan1" % (self.ip_range_start, self.ip_range_end, self.ip_address))

Jack Coulter (jscinoz)
description: updated
Revision history for this message
Jack Coulter (jscinoz) wrote :

Note that --bind-interfaces is not the same as --interface. From the dnsmasq man page:

"On systems which support it, dnsmasq binds the wildcard address, even when it is listening on only some interfaces. It then discards requests that it shouldn’t reply to. This has the advantage of working even when interfaces come and go and change address. This option forces dnsmasq to really bind only the interfaces it is listening on. About the only time when this is useful is when running another nameserver (or another instance of dnsmasq) on the same machine. Setting this option also enables multiple instances of dnsmasq which provide DHCP service to run in the same machine."

It would also appear that --except-interface=lo is required to stop it interfering with other dnsmasq instances. The description has been updated to include this.

Attached is a patch that should fix this

description: updated
Revision history for this message
Valmantas Palikša (walmis) wrote :

Ah I missed that, thanks. Fix committed.

Changed in blueman:
status: New → Fix Committed
Revision history for this message
MF (mmuruev) wrote :

I instaled dnsmasq and now after boot have a message popup box
dnsmasq: failed to bind listening socket for fe80::9427:22ff:fe88:77cf: Address already in use
And localized message about doesn't work BT network.
Distr. ubuntu 10.10

Changed in blueman:
status: Fix Committed → Incomplete
status: Incomplete → In Progress
papukaija (papukaija)
tags: added: patch
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.