Opened 11 years ago

Closed 10 years ago

#2105 closed enhancement (worksforme)

nas: can't enable both wpa and wpa2

Reported by: mvalsasna@… Owned by: developers
Priority: high Milestone: Kamikaze 7.07
Component: packages Version:
Keywords: nas wpa2 Cc:


if the documentation in are still correct, it should be possible to enable both wpa and wpa2 by using nas cmdline options -m 66 (wpa enterprise) or -m 132 (wpa psk), and this was supported in whiterussian by setting nvram variable wl0_akm to 'wpa wpa2' or 'psk psk2' respectively.

in kamikaze 7.06 this seems to be non supported anymore.

/lib/wifi/ seems to be the script responsible for launching nas, and it only considers psk, psk2, wpa, wpa2.

if there isn't a reason not to allow enabling both wpa and wpa2, it could be extended to parse also wireless.cfg2.encryption='wpa wpa2' and 'psk psk2'

Attachments (0)

Change History (5)

comment:1 Changed 11 years ago by florian

  • Milestone set to Kamikaze 7.07
  • Priority changed from normal to high

comment:2 Changed 11 years ago by nico

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

It was fixed in [7682] so it should be fixed in kamikaze 7.07 too (branched in [7832]).

comment:3 follow-up: Changed 10 years ago by eli+sd56f4@…

  • Resolution fixed deleted
  • Status changed from closed to reopened

Hi, I had trouble getting psk and psk2 to work with nas in Kamikaze 7.09 (brcm-2.4) on a WRT54GL v1.1

I was only able to get nas to run in psk+psk2 mode by manually running nas with the -m 132 -w 6 options. The wifi script and /etc/init.d/network restart would always start nas with -m 128 -w 4, regardless of what combination of 'option encryption' I used that included 'psk'.

For example, I tried these config lines (one at a time, of course):

option encryption psk psk2
option encryption 'psk psk2'
option encryption "psk psk2"
option encryption 'psk, psk2'
option encryption "psk,psk2"
option encryption "psk2 psk"

... you get the idea, I'm pretty sure I tried every combination.

I'm not sure if this is the most appropriate way to fix it, but this diff enabled the desired behavior on a WRT54GL v1.1:

[eli@mal2 ~]$ diff -Naur*
--- 2008-01-02 16:30:15.381346592 -0500
+++     2008-01-02 16:30:45.238021398 -0500
@@ -155,7 +155,7 @@
                                config_get key "$vif" key
                                case "$enc" in
-                                       wpa*+wpa2*|WPA*+WPA2*|*psk+*psk2|*PSK+*PSK2) auth=132; wsec=6;;
+                                       wpa*wpa2*|WPA*WPA2*|*psk*psk2|*PSK*PSK2) auth=132; wsec=6;;
                                        wpa2*|WPA2*|*PSK2|*psk2) auth=128; wsec=4;;
                                        *) auth=4; wsec=2;;
@@ -169,7 +169,7 @@
                                config_get server "$vif" server
                                config_get port "$vif" port
                                case "$enc" in
-                                       wpa*+wpa2*|WPA*+WPA2*) auth=66; wsec=6;;
+                                       wpa*wpa2*|WPA*WPA2*) auth=66; wsec=6;;
                                        wpa2*|WPA2*) auth=64; wsec=4;;
                                        *) auth=2; wsec=2;;

Thanks for the excellent distro!

comment:4 in reply to: ↑ 3 Changed 10 years ago by grégoire

On a fresh Kamikaze 7.09 install, it apparently works with:

option encryption psk+psk2

comment:5 Changed 10 years ago by nbd

  • Resolution set to worksforme
  • Status changed from reopened to closed

Add Comment

Modify Ticket

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

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

Note: See TracTickets for help on using tickets.