Creating hotspot leads to endless connect/disconnect loop

Bug #857294 reported by tankdriver
This bug affects 11 people
Affects Status Importance Assigned to Milestone
dnsmasq (Ubuntu)
network-manager (Ubuntu)

Bug Description

- Create Hotspot via "System Settings > Network > Wireless > Hotspot" or manually in the network-manager
- What I expected:
* Hotspot is created, clients can use internet connection
- What happened instead:
* The new connection connects and disconnects after a second, when "autoconnect" is enabled, this happens very fast in a endless loop.

I think this error message in the log causes the failure:
> dnsmasq[5213]: failed to create listening socket for Address already in use
> dnsmasq[5213]: FAILED to start up

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: network-manager
ProcVersionSignature: Ubuntu 3.0.0-11.18-generic 3.0.4
Uname: Linux 3.0.0-11-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 1.23-0ubuntu1
Architecture: amd64
CRDA: Error: [Errno 2] Datei oder Verzeichnis nicht gefunden
Date: Fri Sep 23 13:06:40 2011
EcryptfsInUse: Yes
 auto lo
 iface lo inet loopback
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Beta amd64 (20110901)
 default via dev eth0 proto static dev eth0 scope link metric 1000 dev eth0 proto kernel scope link src
SourcePackage: network-manager
UpgradeStatus: Upgraded to oneiric on 2011-09-23 (0 days ago)
mtime.conffile..etc.NetworkManager.NetworkManager.conf: 2011-09-14T08:20:06.811759

Revision history for this message
tankdriver (stoneraider-deactivatedaccount) wrote :
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

tankdriver, I think the address in use error may be a red herring, as thats what happens if you rapidly shutdown and start back up a listening socket without using the SO_REUSEADDR socket option. dnsmasq is basically saying that it can't listen because there may be existing half-closed sockets on the port it wants to listen on.

That said, it needs to be investigated in both network manager and dnsmasq, so marking as Medium importance in both.

Changed in dnsmasq (Ubuntu):
importance: Undecided → Medium
Changed in network-manager (Ubuntu):
importance: Undecided → Medium
Revision history for this message
tankdriver (stoneraider-deactivatedaccount) wrote :

I found a workaround to this issue:
- kill any running dnsmasq process. (or restart computer afterwards)
- Disable IPv6 in the Hotspot settings. (IPv6: Ignore)
- restart the Hotspot


The default settings of the Hotspot in Oneiric are:
- IPv4: Shared with other Computers
- IPv6: Automatic

When selecting "IPv6: Ignore" everything works as expected.
Suggesting to change the default settings of the Hotspot-feature, because I think IPv6 is not really necessary for Ad-Hoc Networks in order to work around this bug.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

It indeed appears to be directly related to bringing up IPv6.. However, since IPv6 hotspots don't appear to currently being supported (no iptables code, no parameters passed for it to dnsmasq, etc.; it probably simply should be ignored in all cases.

Changed in network-manager (Ubuntu):
status: New → Confirmed
status: Confirmed → Triaged
tags: added: ipv6
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

This was an issue in NM, fixed in we'll default to IPv6: Ignore if creating an ad-hoc network:

Closing as Fix Released for n-m and Invalid for dnsmasq.

Changed in network-manager (Ubuntu):
status: Triaged → Fix Released
Changed in dnsmasq (Ubuntu):
status: New → Invalid
Revision history for this message
Ian (superian) wrote :

Is there a reason that ubuntu6 isn't in the 11.10 repositories?

With ubuntu5.1, which is the latest one there, I get the same 'disconnects within seconds' problem as reported here.

Revision history for this message
iMac (imac-netstatz) wrote :

Hmm. I just created a Hotspot via Network Settings in 12.04, and it has put IPV6 in automatic. I noticed dnsmasq wasn't active and found this post.

Switching to ignore.

Revision history for this message
iMac (imac-netstatz) wrote :

The IPV6 was not my issue (or might have been secondary). Even with "Ignore" my dnsmasq services are not responding to DHCP requests. Things look good from the process output (which shows flags, etc for dnsmasq) but no joy when inspecting the wire for DHCP request/response. A separate issue in any event.

I did note that when I had IPV6 enabled (set to automatic) that dnsmasq seemed to function and support it based on the syslog output, so perhaps the lack of IPV6 support has been addressed in 12.04.

Revision history for this message
ganassa (ganassa) wrote :

As suggested here:

the workaround is to do a

sudo killall dnsmasq

before creating the hotspot.

You need to do that every time. I have not idea how to automate it.

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

Other bug subscribers