madwifi + wpa-psk auth + dhcp is not working

Bug #36238 reported by Stephan Rügamer
14
Affects Status Importance Assigned to Milestone
Ubuntu
Fix Released
Medium
Unassigned

Bug Description

Hi,

the combination of madwifi + wpa-psk auth (from wpasupplicant package) + dhcp is
not working in breezy.
It's a known madwifi bug, please look here:
http://madwifi.sourceforge.net/dokuwiki/doku.php?id=slackware&s=DHCP#support_for_wpa_encryption

The last working madwifi for wpasupplicant is a cvs snapshot from 2005-07-07.

Revision history for this message
Dennis Kaarsemaker (dennis) wrote :

The stock ubuntu kernel modules have alwys worked for me (same setup). The
madwifi-source modules, built using module assistant will also work. The URL you
posted conatins information for slackware and is irrelevant for Ubuntu.

Revision history for this message
Stephan Rügamer (sruegamer) wrote :

I tried now two different wlan routers (d-link di-524 and linksys wrt54g with
original linksys firmware and dd-wrt) both had the same issues.
an external dhcp on a different server works...wpa-supplicant said, it's
authenticated, but running the dhcp on the router doesn't give me any ip address
or anything.

a static routing from the wifi client running madwifi + wpasupplicants wpa-psk
works as expected. but no dhcp request will be honored.

Revision history for this message
Dennis Kaarsemaker (dennis) wrote :

Make sure dhclient is not started before you are authenticated. Also please test
with the latest wpa_supplicant packages.

Revision history for this message
wberrier (wberrier) wrote :

I'm also having trouble getting wpa to work with madwifi. Here's a thread that
describes the problem:

http://thread.gmane.org/gmane.linux.drivers.madwifi.user/7657

I had no troubles in hoary but when I upgraded to breezy, my wireless stopped
working.

I tried recompiling wpa_supplicant and that did not solve the problem. I tried
using breezy's wpa_supplicant with hoary's kernel, and that didn't work as well.

I tried compiling madwifi from cvs but I was getting errors when inserting the
modules:

insmod: error inserting 'ath_hal.ko': -1 Unknown symbol in module

This happens when I compile the cvs madwifi with either gcc-3.4 or gcc-4.0

I tried compiling from the restricted source (apt-get source linux-restrict...)
and also no luck. (Can't build/find //arch/Makefile)

I've compiled madwifi on other distros without any problems, I'm not sure what
the deal is.

Anyway, I wanted to confirm the above link of needing to compile the madwifi and
wpa_supplicant over again, but failed to build the modules.

But, I think that the above info should be enough to say that wpa_supplicant and
madwifi and closely knit, and maybe they just need to be recompiled.

Hope this helps.

Revision history for this message
wberrier (wberrier) wrote :

After having another day to look at this, I've finally tracked the problem down.

I have my router (wrt54g running openwrt with the nas linksys binary) set to use
either wpa or wpa2. Turns out that wpa_supplicant 0.4.5 is unable to
authenticate in wpa mode when my router is set to wpa or wpa2. But, if I set
wpa_supplicant to use wpa2, it works.

Also, if I set my router to use only wpa, and then set wpa_supplicant to use
wpa, it works.

So, the problem is with wpa_supplicant failing to authenticate with wpa when the
router is set to wpa or wpa2. Here's the error message I get when running in
debug mode:

could not parse WPA/RSN IE

Revision history for this message
Stephan Rügamer (sruegamer) wrote :

Hi,

(In reply to comment #5)
> After having another day to look at this, I've finally tracked the problem down.
>
> I have my router (wrt54g running openwrt with the nas linksys binary) set to use
> either wpa or wpa2. Turns out that wpa_supplicant 0.4.5 is unable to
> authenticate in wpa mode when my router is set to wpa or wpa2. But, if I set
> wpa_supplicant to use wpa2, it works.
>
> Also, if I set my router to use only wpa, and then set wpa_supplicant to use
> wpa, it works.
>
> So, the problem is with wpa_supplicant failing to authenticate with wpa when the
> router is set to wpa or wpa2. Here's the error message I get when running in
> debug mode:
>
> could not parse WPA/RSN IE
>
>

Well, I tried it with a d-link DI-524 and a LinkSys WRT54G (With orig software
and dd-wrt).
I don't see an option to set only wpa/wpa2 or anything else.

So, seeing this, and not your option, how can we achieve this goal, to have
wpa_supplicant + madwifi running out of the box?

Using another card, with ndiswrapper this works btw out of the box.

I think using a router and using some software only setting on the router is no
solution.

Revision history for this message
wberrier (wberrier) wrote :

I'm sorry, I can't remember the available options for wpa with the stock
firmware that comes with openwrt.

It's possible to run out of the box. In my case, my router was supporting wpa
and wpa2. But, wpa_supplicant only worked when told to use wpa2.

I think we were having two separate issues.

Try starting wpa_supplicant, wait until iwconfig shows an established key, and
then run dhclient afterwards ('dhclient ath0').

I'm going to post the problem I was having on the hostap/wpa_supplicant
bugzilla, as I think it's a problem with wpa_supplicant. It's not that
wpa_supplicant doesn't work, it's that it only tries wpa2 when both protocols
are available.

Revision history for this message
Fadi.Asfour (fadi-asfour) wrote :

Hi,

I've upgraded from hoary to breezy as well. Under hoary I was able to
authenticate and receive and IP address from my linksys WRT54G router, which was
using WPA2-PSK for authentication. After upgrading (did not change the
wpa_supplicant.conf file) I could not connect through my wifi NIC. Further
investigation revealed that the wpa supplicant was working fine. using wpa_cli
and sniffing the communications between my computer and the router revealed that
both devices were handshaking and eventually authenticated the computer.
However, negotiating a DHCP request was a garbled mess. Therefore I suspected
that the madwifi driver was the culprit. I recompiled the madwifi driver
following the instructions at http://www.marlow.dk/site.php/tech/madwifi using
the latest madwifi cvs snapshot. After installing the madwifi module, I verified
that it installed correctly under /lib/modules (find /lib/mod* -type f -iname
'ath*.ko' and found that I had two copies (it seems I may have not included the
proper path for the module installation). After deleting both copies,
reinstalling the module and regenerating the module map (depmod -ae) I was able
to receive and IP from the router.

Hope this helps,
Cheers

Revision history for this message
Hakatak-gmail (hakatak-gmail) wrote :

I can confirm this as a problem. My system also worked with Hoary, but fails in
Breezy. I can statically assign an IP, but dhcp fails.

Revision history for this message
Stephan Rügamer (sruegamer) wrote :

I'm confirming the bug now after several comments which describes the same problem.

Revision history for this message
Thiago Campos (thiagocampos) wrote :

wpa_supplicant version 0.4.6 available on universe repositories fixes this problem.
http://archive.ubuntu.com/ubuntu/pool/universe/w/wpasupplicant/

Revision history for this message
Dennis Kaarsemaker (dennis) wrote :

This is definietly fixed in dapper.

Revision history for this message
Alfredo Matas (amatas) wrote :

If you patch the original kernel of breezy ( 2.6.12-10 ) with wireless extensions v18:

http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/iw_we18-5.diff

madwifi+wpa-psk+dhcp works fine.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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