My Hackergotchi

Updated: Never — Philip's Blog

Now featuring regular updates!

Sun, 31 Aug 2008

03:49 – Dangers of wpa_supplicant.conf

18:49 PDT

I'm staying at the youth hostel on Jericho Beach in Vancouver. Great place. And it offers free wireless internet access. For some reason, I couldn't get it to work last night. That is to say, I could get it to associate, but I didn't actually see any IP traffic. Lots of control frames on Ethernet though.

After some fiddling today, I figured out what was wrong: wpa_supplicant thought that the 40-bit WEP key was a 104-bit WEP key. I had mistakenly quoted the wep_key0 parameter in my wpa_supplicant.conf file.

The failure mode of the access point (don't pass IP traffic, but do pass other broadcast Ethernet frames) made this fairly difficult to diagnose. I don't have a copy of 802.11 with me for light holiday reading (no, really), but I would be interested to know what it says about this.

Note that the wpa_supplicant.conf(5) manual page clearly states that the wep_keyX parameters are not to be quoted. It should probably mention that if the parameter is quoted, it will be treated like a string rather than fail with a syntax error.

This is one of my pet peeves about coders. That the code has no context. In other words, if you are trying to process "wep_keyX", then you know that only letters and numbers should follow. So throw away illegal characters and see if the rest looks like a wep key. If however, you find a $ instead of a 4 in the middle of the key, don't just report "syntax error" but highlight that dollar sign. I can't tell you how many times I've seen error messages that translate to "its not working". Duh.

Unfortunately, letting "little things" slide has become part of coder culture and it causes users a lot of frustration and wastes a lot of their(our) time.

Posted by drew at Mon Jul 6 03:46:55 2009

Name:

Email:

URL:

Comment:


Prove that you are not a spammer: