Modify

Opened 9 years ago

Closed 8 years ago

#2703 closed defect (duplicate)

psk2 problems in sta mode with atheros

Reported by: nlinux Owned by: developers
Priority: normal Milestone:
Component: base system Version:
Keywords: Cc:

Description

I'm using the following settings with madwifi for atheros and I keep getting psk2 error. If I change to psk it works fine using the same key, but not for psk2.

I've also updated to the the latest kamikaze trunk (Rev 9548) and this problem is there.

        option device   wifi1
        option network  lan
        option mode     'sta'
        option ssid     'testing'
        option encryption       'psk2'
        option hidden   0            
        option isolate  '0'        
        option txpower  '23'
        option bgscan   '0'
        option wds      '0'
        option key      '11111111' 

syslog shows this:


Dec 31 19:00:33 tester user.info kernel: device ath2 entered promiscuous mode
Dec 31 19:00:34 tester user.info : Line 7: Invalid passphrase length 64 (expected: 8..63) 'a56dda46a4aff0e8c2d5fd0cbc0038707e1e711287d7806d0d3b4424814438e6"'. 
Dec 31 19:00:34 tester user.info : Line 7: failed to parse psk '"a56dda46a4aff0e8c2d5fd0cbc0038707e1e711287d7806d0d3b4424814438e6"'. 
Dec 31 19:00:34 tester user.info : Line 8: WPA-PSK accepted for key management, but no PSK configured. 
Dec 31 19:00:34 tester user.info : Line 8: failed to parse network block. 
Dec 31 19:00:34 tester user.info : Failed to read or parse configuration '/var/run/wpa_supplicant-ath2.conf'. 


Attachments (0)

Change History (4)

comment:1 Changed 9 years ago by b.candler@…

I see this too. For now my solution is to edit /lib/wifi/madwifi.sh and change

passphrase=`wpa_passphrase ${ssid} "${key}" | grep psk | grep -v \#| cut -d= -f2`

to

passphrase="${key}"

comment:2 Changed 8 years ago by b.candler@…

The problem is that a precomputed hex PSK must not be quoted. This is demonstrated by the sample output from wpa_passphrase:

$ wpa_passphrase foo barbarbar
network={
        ssid="foo"
        #psk="barbarbar"
        psk=06386536cc5efd03f3fa84aa8ea2cc8408973df34bd84b53806eed3023cda67e
}

and can be confirmed by looking at wpa_config_parse_psk() in wpa_supplicant/config.c

Suggested fix:

--- madwifi.sh.orig     Fri Jan  4 11:09:36 2008
+++ madwifi.sh  Fri Jan  4 11:10:37 2008
@@ -254,7 +254,7 @@
                                                case "$enc" in
                                                        PSK|psk)
                                                                proto='proto=WPA'
-                                                               passphrase="${key}"
+                                                               passphrase="\"${key}\""
                                                                ;;
                                                        PSK2|psk2)
                                                                proto='proto=RSN'
@@ -269,7 +269,7 @@
        ssid="$ssid"
        key_mgmt=WPA-PSK
        $proto
-       psk="$passphrase"
+       psk=$passphrase
 }
 EOF
                                        ;;

comment:3 Changed 8 years ago by frederic.nadeau@…

Hi,

I build kamikaze from trunk this morning(10217) and confirm this bug. Configuration are more or less the same and syslog output is the same(exept psk key of course).

I just like to confirm fix. Manually changing madwifi.sh on the router fixed the issued.

Thanks for the fix, I was also looking for a solution. Can this be added to trunk?

comment:4 Changed 8 years ago by nbd

  • Resolution set to duplicate
  • Status changed from new to closed

dupe of #1939

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.