Date: Mon, 25 Aug 2008 13:42:53 GMT From: Johann Hugo <jhugo@meraka.csir.co.za> To: freebsd-gnats-submit@FreeBSD.org Subject: bin/126822: wpa_supplicant - WPA PSK does not work in adhoc mode. Message-ID: <200808251342.m7PDgrdD022229@www.freebsd.org> Resent-Message-ID: <200808251350.m7PDo47x046618@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 126822 >Category: bin >Synopsis: wpa_supplicant - WPA PSK does not work in adhoc mode. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Aug 25 13:50:03 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Johann Hugo >Release: 7.0-STABLE >Organization: CSIR >Environment: mesh-9ddd:~ # uname -a FreeBSD mesh-9ddd 7.0-STABLE FreeBSD 7.0-STABLE #17: Wed Jul 30 10:02:20 UTC 200 8 jhay@dolphin.meraka.csir.co.za:/usr/obj/usr/src/sys/SMALL i386 >Description: PA PSK does not work in adhoc mode. According to the "wpa_supplicant Reference Manual 0.4.x" it should be possible: --------------------------------------------- IEEE 802.11 operation mode (Infrastucture/IBSS). 0 = infrastructure (Managed) mode, i.e., associate with an AP. 1 = IBSS (ad-hoc, peer-to-peer) Note: IBSS can only be used with key_mgmt NONE (plaintext and static WEP) and key_mgmt=WPA-NONE (?xed group key TKIP/CCMP). In addition, ap_scan has to be set to 2 for IBSS. WPA-None requires following network block options: proto=WPA, key_mgmt=WPA-NONE, pairwise=NONE, group=TKIP (or CCMP, but not both), and psk must also be set (either directly or using ASCII passphrase). -------------------------------------------- My supplicant file: mesh-9ddd:~ # more /etc/wpa_supplicant.conf ap_scan=2 network={ ssid="ptamesh" mode=1 proto=WPA key_mgmt=WPA-NONE pairwise=NONE group=TKIP psk="mesh-ipv6" } If I run wpa_supplicant in debug mode it shows that the wireless card is trying to do a ssid scan, but then it fails because the adapter is in Adhoc mode. Debug mode output: mesh-9ddd:~ # wpa_supplicant -d -i ath0 -c /etc/wpa_supplicant.conf Initializing interface 'ath0' conf '/etc/wpa_supplicant.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A' Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf' Reading configuration file '/etc/wpa_supplicant.conf' ap_scan=2 Priority group 0 id=0 ssid='ptamesh' Initializing interface (2) 'ath0' EAPOL: SUPP_PAE entering state DISCONNECTED EAPOL: KEY_RX entering state NO_KEY_RECEIVE EAPOL: SUPP_BE entering state INITIALIZE EAP: EAP entering state DISABLED EAPOL: External notification - portEnabled=0 EAPOL: External notification - portValid=0 Own MAC address: 00:80:48:50:9d:dd wpa_driver_bsd_set_wpa: enabled=1 wpa_driver_bsd_set_wpa_internal: wpa=3 privacy=1 wpa_driver_bsd_del_key: keyidx=0 wpa_driver_bsd_del_key: keyidx=1 wpa_driver_bsd_del_key: keyidx=2 wpa_driver_bsd_del_key: keyidx=3 wpa_driver_bsd_set_countermeasures: enabled=0 wpa_driver_bsd_set_drop_unencrypted: enabled=1 Setting scan request: 0 sec 100000 usec Added interface ath0 State: DISCONNECTED -> SCANNING Trying to associate with SSID 'ptamesh' Cancelling scan request WPA: clearing own WPA/RSN IE Automatic auth_alg selection: 0x1 wpa_driver_bsd_set_auth_alg alg 0x1 authmode 1 WPA: No WPA/RSN IE available from association info WPA: Set cipher suites based on configuration WPA: Selected cipher suites: group 8 pairwise 1 key_mgmt 16 proto 1 WPA: clearing AP WPA IE WPA: clearing AP RSN IE WPA: using GTK TKIP WPA: using PTK NONE WPA: using KEY_MGMT WPA-NONE WPA: Set own WPA IE default - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 02 01 00 00 50 f2 00 01 00 00 50 f2 00 No keys have been configured - skip key clearing wpa_driver_bsd_set_key: alg=TKIP addr=ff:ff:ff:ff:ff:ff key_idx=0 set_tx=1 seq_len=6 key_len=32 wpa_driver_bsd_set_drop_unencrypted: enabled=1 State: SCANNING -> ASSOCIATING wpa_driver_bsd_associate: ssid 'ptamesh' wpa ie len 24 pairwise 0 group 2 key mgmt 4 ioctl[SIOCS80211, op 22, len 24]: Invalid argument Association request to the driver failed wpa_driver_bsd_set_key: alg=TKIP addr=ff:ff:ff:ff:ff:ff key_idx=0 set_tx=1 seq_len=6 key_len=32 Cancelling authentication timeout State: ASSOCIATING -> COMPLETED CTRL-EVENT-CONNECTED - Connection to 00:00:00:00:00:00 completed (auth) [id=-1 id_str=] EAPOL: External notification - portControl=ForceAuthorized >How-To-Repeat: Create the following wpa_supplicant.conf file and run wpa_supplicant in it's debug mode. mesh-9ddd:~ # more /etc/wpa_supplicant.conf ap_scan=2 network={ ssid="ptamesh" mode=1 proto=WPA key_mgmt=WPA-NONE pairwise=NONE group=TKIP psk="mesh-ipv6" } wpa_supplicant -d -i ath0 -c /etc/wpa_supplicant.conf >Fix: >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808251342.m7PDgrdD022229>