Network Manager fails to connect to, or create a wireless connection for, an all-numeric SSID

Bug #824260 reported by John S. Gruber
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Could not connect to an all-numeric SSID, or create a connection for one (it would disappear from the list of created wireless connections immediately).

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: network-manager 0.8.9997+git.20110721t045648.36db194-0ubuntu1
ProcVersionSignature: Ubuntu 3.0.0-7.9-generic 3.0.0
Uname: Linux 3.0.0-7-generic i686
Architecture: i386
CRDA: Error: [Errno 2] No such file or directory
CasperVersion: 1.277
Date: Thu Aug 11 01:25:32 2011
IfupdownConfig:
 auto lo
 iface lo inet loopback
IpRoute:
 default via 192.168.1.1 dev wlan0 proto static
 192.168.1.0/24 dev wlan0 proto kernel scope link src 192.168.1.33 metric 2
LiveMediaBuild: Ubuntu 11.10 "Oneiric Ocelot" - Alpha i386 (20110808)
NetworkManager.state:
 [main]
 NetworkingEnabled=true
 WirelessEnabled=true
 WWANEnabled=true
 WimaxEnabled=true
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
RfKill:
 0: phy0: Wireless LAN
  Soft blocked: no
  Hard blocked: no
SourcePackage: network-manager
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
John S. Gruber (jsjgruber) wrote :
Revision history for this message
John S. Gruber (jsjgruber) wrote :

Messages in syslog:
Aug 11 01:13:03 ubuntu NetworkManager[1708]: <info> Activation (wlan0) starting connection '920'
Aug 11 01:13:03 ubuntu NetworkManager[1708]: <info> (wlan0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
Aug 11 01:13:03 ubuntu NetworkManager[1708]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) scheduled...
Aug 11 01:13:03 ubuntu NetworkManager[1708]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) started...
Aug 11 01:13:03 ubuntu NetworkManager[1708]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) scheduled...
Aug 11 01:13:03 ubuntu NetworkManager[1708]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) complete.
Aug 11 01:13:03 ubuntu NetworkManager[1708]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) starting...
Aug 11 01:13:03 ubuntu NetworkManager[1708]: <info> (wlan0): device state change: prepare -> config (reason 'none') [40 50 0]
Aug 11 01:13:03 ubuntu NetworkManager[1708]: <info> Activation (wlan0/wireless): access point '920' has security, but secrets are required.
Aug 11 01:13:03 ubuntu NetworkManager[1708]: <info> (wlan0): device state change: config -> need-auth (reason 'none') [50 60 0]
Aug 11 01:13:03 ubuntu NetworkManager[1708]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) complete.
Aug 11 01:13:04 ubuntu NetworkManager[1708]: get_uchar_array: 802-11-wireless / ssid ignoring invalid byte element '920' (not between 0 and 255 inclusive)
Aug 11 01:13:04 ubuntu NetworkManager[1708]: ssid_parser: ignoring invalid SSID for 802-11-wireless / ssid
Aug 11 01:13:04 ubuntu NetworkManager[1708]: keyfile: error: invalid or missing connection property 'ssid'
Aug 11 01:13:04 ubuntu NetworkManager[1708]: <info> (wlan0): device state change: need-auth -> disconnected (reason 'connection-removed') [60 30 38]
Aug 11 01:13:04 ubuntu NetworkManager[1708]: <info> (wlan0): deactivating device (reason: 38).

Revision history for this message
John S. Gruber (jsjgruber) wrote :

I should have added, just changing the SSID to N920 allowed the wireless connection to be made.

Revision history for this message
brncsk (adam-barancsuk) wrote :

I also bumped into this one today. Looking at the code revealed the bug is in get_uchar_array() (src/settings/plugins/keyfile/reader.c, line 733). Besides SSIDs stored as normal strings, the function also has code for reading SSIDs in the form of a semicolon-separated list of integers (the "old format" as the comment refers to it). So when the function encounters an all-numeric SSID, it tries to parse it as if it was in this "old format". This inevitably fails for integers greater than 255 and would report a single-char SSID for lower values which isn't exactly correct either. I'm not really into the key-value file parser in glib but I don't think there's a good way to distinguish between these two cases.

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

Great analysis by brncsk; we'll just need to figure a way to fix this properly. For now, I'm keeping this unassigned.

My guess is that if the whole string has to semicolons, then we should probably skip the old format parser completely; but I haven't looked at the code yet ;)

Changed in network-manager (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Andrew Rufkahr (andrewjr911) wrote :

A good work around right now is a) rename your ssid, or b) go into the connection information and edit the ssid manually and set it to autoconnect.

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

This has been fixed upstream now; so I'll mark this bug as a duplicate of 874328 which covers pretty much the same problem.

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.