Re: Errors running current SVN code



Dan Williams wrote:
> If you can build your own copy of wpa_supplicant, put some
> debugging prints in driver_wext.c in
> wpa_driver_wext_get_scan_results() in the 'case
> SIOCGIWESSID:' block to print out the code flow there.
> What's 'ssid_len'?  Does the 'if (custom + ssid_len >
> end)' trigger?

No it doesn't, but the problem does seem to be passing
through this code. The ssid_len is set to 8 (same as NM
sees), but custom appears to be an empty string.

I guess this points to a possible driver bug, so I'll try
update those just in case, see if that helps...

Incidentally, NM is currently running fine with the attached
patch applied, filtering out the obviously bad item. Would
you want to apply it as a form of idiot-proofing, or do you
prefer to just rely on drivers (and wpa_supplicant) not
providing bad data?

Simon.
Index: src/nm-device-802-11-wireless.c
===================================================================
--- src/nm-device-802-11-wireless.c	(revision 2249)
+++ src/nm-device-802-11-wireless.c	(working copy)
@@ -2215,6 +2215,11 @@
 					ssid_len = entry.array_len;
 				if (ssid_len <= 0)
 					goto next;
+        if (entry.bytearray_value[0] == 0 && ssid_len>0) {
+          nm_warning("Error: got an access point with an invalid SSID");
+          goto out;
+        }
+
 				/* Stupid ieee80211 layer uses <hidden> */
 				if (((ssid_len == 8) || (ssid_len == 9))
 				        && (memcmp (entry.bytearray_value, "<hidden>", 8) == 0))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]