Creating hotspot leads to endless connect/disconnect loop

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

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 10.42.43.1: Address already in use
> dnsmasq[5213]: FAILED to start up

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: network-manager 0.9.1.90-0ubuntu1
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
IfupdownConfig:
 auto lo
 iface lo inet loopback
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Beta amd64 (20110901)
IpRoute:
 default via 192.168.2.1 dev eth0 proto static
 169.254.0.0/16 dev eth0 scope link metric 1000
 192.168.2.0/24 dev eth0 proto kernel scope link src 192.168.2.10
NetworkManager.state:
 [main]
 NetworkingEnabled=true
 WirelessEnabled=true
 WWANEnabled=true
 WimaxEnabled=true
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 0.9.1.90-0ubuntu6: we'll default to IPv6: Ignore if creating an ad-hoc network:
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/830178

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:

http://askubuntu.com/questions/76981/cannot-make-wi-fi-hotspot

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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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