Encryption problems with nl80211

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, I am Simon and I am new in this mail list.

I am experiencing problems enabling encryption key after creating an
IBSS network through wpa_supplicant.

I can create the network, which is visible from other devices, but it
appears always as unprotected, even if encryption key is configured.

The version of wpa_supplicant is 2.3.

This is an example of mine wpa_supplicant.conf file (the same I always
used):

ap_scan=1
ctrl_interface=/var/run/wpa_supplicant
network={
   ssid="my-net-302"
   mode=1
   frequency=2412
   key_mgmt=NONE
   priority=10
   wep_key0="password" 
}

and after running:

wpa_supplicant -D nl80211,wext -i wlan0
-c /etc/wpa_supplicant/wpa_supplicant.conf -dd

The output returns:

wpa_supplicant v2.3
random: Trying to read entropy from /dev/random
Successfully initialized wpa_supplicant
Initializing interface 'wlan0' conf
'/etc/wpa_supplicant/wpa_supplicant.conf' driver 'nl80211,wext'
ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant/wpa_supplicant.conf' ->
'/etc/wpa_supplicant/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant/wpa_supplicant.conf'
ap_scan=1
ctrl_interface='/var/run/wpa_supplicant'
Line: 3 - start of a new network block
ssid - hexdump_ascii(len=10):
     6d 79 2d 6e 65 74 2d 33 30 32                     my-net-302      
mode=1 (0x1)
frequency=2412 (0x96c)
key_mgmt: 0x4
priority=10 (0xa)
wep_key0 - hexdump(len=5): [REMOVED]
Priority group 10
   id=0 ssid='my-net-302'
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
rfkill: initial event: idx=1 type=2 op=0 soft=0 hard=0
nl80211: Supported cipher 00-0f-ac:1
nl80211: Supported cipher 00-0f-ac:5
nl80211: Supported cipher 00-0f-ac:2
nl80211: Supported cipher 00-0f-ac:4
nl80211: interface wlan0 in phy phy0
nl80211: Set mode ifindex 3 iftype 2 (STATION)
nl80211: Subscribe to mgmt frames with non-AP handle 0xf9860
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
nl_handle=0xf9860 match=06
nl80211: Register frame command failed (type=208): ret=-95 (Operation
not supported)
nl80211: Register frame match - hexdump(len=1): 06
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
nl_handle=0xf9860 match=0a07
nl80211: Register frame command failed (type=208): ret=-95 (Operation
not supported)
nl80211: Register frame match - hexdump(len=2): 0a 07
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
nl_handle=0xf9860 match=0a11
nl80211: Register frame command failed (type=208): ret=-95 (Operation
not supported)
nl80211: Register frame match - hexdump(len=2): 0a 11
nl80211: Failed to register Action frame processing - ignore for now
netlink: Operstate: ifindex=3 linkmode=1 (userspace-control),
operstate=5 (IF_OPER_DORMANT)
nl80211: driver param='(null)'
Add interface wlan0 to a new radio phy0
nl80211: Regulatory information - country=00
nl80211: 2402-2472 @ 40 MHz 20 mBm
nl80211: 2457-2482 @ 40 MHz 20 mBm (no IR)
nl80211: 2474-2494 @ 20 MHz 20 mBm (no OFDM) (no IR)
nl80211: 5170-5250 @ 160 MHz 20 mBm (no IR)
nl80211: 5250-5330 @ 160 MHz 20 mBm (DFS) (no IR)
nl80211: 5490-5730 @ 160 MHz 20 mBm (DFS) (no IR)
nl80211: Added 802.11b mode based on 802.11g information
wlan0: Own MAC address: 00:19:88:4d:53:ae
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=0
set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=1
set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=2
set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=3
set_tx=0 seq_len=0 key_len=0
wlan0: RSN: flushing PMKID list in the driver
nl80211: Flush PMKIDs
wlan0: Setting scan request: 0.100000 sec
wlan0: WPS: UUID based on MAC address:
39cee858-d55e-5e3d-b589-30e2c9d32960
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
nl80211: Skip set_supp_port(unauthorized) while not associated
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
Using existing control interface directory.
ctrl_iface bind(PF_UNIX) failed: Address already in use
ctrl_iface exists and seems to be in use - cannot override it
Delete '/var/run/wpa_supplicant/wlan0' manually if it is not used
anymore
Failed to initialize control interface '/var/run/wpa_supplicant'.
You may have another wpa_supplicant process already running or the file
was
left by an unclean termination of wpa_supplicant in which case you will
need
to manually remove this file before starting wpa_supplicant again.

Failed to add interface wlan0
wlan0: Request to deauthenticate - bssid=00:00:00:00:00:00
pending_bssid=00:00:00:00:00:00 reason=3 state=DISCONNECTED
wlan0: State: DISCONNECTED -> DISCONNECTED
nl80211: Set wlan0 operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=5
(IF_OPER_DORMANT)
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
wlan0: Cancelling scan request
wlan0: Cancelling authentication timeout
Remove interface wlan0 from radio phy0
Remove radio phy0
nl80211: Remove monitor interface: refcount=0
netlink: Operstate: ifindex=3 linkmode=0 (kernel-control), operstate=6
(IF_OPER_UP)
nl80211: Set mode ifindex 3 iftype 2 (STATION)
nl80211: Unsubscribe mgmt frames handle 0x888710e9 (mode change)
root@overo:~# nano /etc/wpa_supplicant/wpa_supplicant.conf 
root@overo:~# ps aux | grep wpa
root      1851  0.0  0.4   6564  2384 ?        Ss   15:25
0:03 /usr/sbin/wpa_supplicant
-c/etc/wpa_supplicant/wpa_supplicant-wlan0.conf -iwlan0
root      6340  2.0  0.2   1848  1016 pts/1    S+   16:54   0:00 grep
wpa
root@overo:~# kill -9 1851 
root@overo:~# ifconfig wlan0 192.168.2.2 up
root@overo:~# wpa_supplicant -D nl80211,wext -i wlan0
-c /etc/wpa_supplicant/wpa_supplicant.conf -dd
wpa_supplicant v2.3
random: Trying to read entropy from /dev/random
Successfully initialized wpa_supplicant
Initializing interface 'wlan0' conf
'/etc/wpa_supplicant/wpa_supplicant.conf' driver 'nl80211,wext'
ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant/wpa_supplicant.conf' ->
'/etc/wpa_supplicant/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant/wpa_supplicant.conf'
ap_scan=1
ctrl_interface='/var/run/wpa_supplicant'
Line: 3 - start of a new network block
ssid - hexdump_ascii(len=10):
     6d 79 2d 6e 65 74 2d 33 30 32                     my-net-302      
mode=1 (0x1)
frequency=2412 (0x96c)
key_mgmt: 0x4
priority=10 (0xa)
wep_key0 - hexdump(len=5): [REMOVED]
Priority group 10
   id=0 ssid='my-net-302'
rfkill: initial event: idx=0 type=1 op=0 soft=0 hard=0
rfkill: initial event: idx=1 type=2 op=0 soft=0 hard=0
nl80211: Supported cipher 00-0f-ac:1
nl80211: Supported cipher 00-0f-ac:5
nl80211: Supported cipher 00-0f-ac:2
nl80211: Supported cipher 00-0f-ac:4
nl80211: interface wlan0 in phy phy0
nl80211: Set mode ifindex 3 iftype 2 (STATION)
nl80211: Subscribe to mgmt frames with non-AP handle 0xf9860
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
nl_handle=0xf9860 match=06
nl80211: Register frame command failed (type=208): ret=-95 (Operation
not supported)
nl80211: Register frame match - hexdump(len=1): 06
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
nl_handle=0xf9860 match=0a07
nl80211: Register frame command failed (type=208): ret=-95 (Operation
not supported)
nl80211: Register frame match - hexdump(len=2): 0a 07
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
nl_handle=0xf9860 match=0a11
nl80211: Register frame command failed (type=208): ret=-95 (Operation
not supported)
nl80211: Register frame match - hexdump(len=2): 0a 11
nl80211: Failed to register Action frame processing - ignore for now
netlink: Operstate: ifindex=3 linkmode=1 (userspace-control),
operstate=5 (IF_OPER_DORMANT)
nl80211: driver param='(null)'
Add interface wlan0 to a new radio phy0
nl80211: Regulatory information - country=00
nl80211: 2402-2472 @ 40 MHz 20 mBm
nl80211: 2457-2482 @ 40 MHz 20 mBm (no IR)
nl80211: 2474-2494 @ 20 MHz 20 mBm (no OFDM) (no IR)
nl80211: 5170-5250 @ 160 MHz 20 mBm (no IR)
nl80211: 5250-5330 @ 160 MHz 20 mBm (DFS) (no IR)
nl80211: 5490-5730 @ 160 MHz 20 mBm (DFS) (no IR)
nl80211: Added 802.11b mode based on 802.11g information
wlan0: Own MAC address: 00:19:88:4d:53:ae
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=0
set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=1
set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=2
set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 addr=(nil) key_idx=3
set_tx=0 seq_len=0 key_len=0
wlan0: RSN: flushing PMKID list in the driver
nl80211: Flush PMKIDs
wlan0: Setting scan request: 0.100000 sec
wlan0: WPS: UUID based on MAC address:
39cee858-d55e-5e3d-b589-30e2c9d32960
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: Supplicant port status: Unauthorized
nl80211: Skip set_supp_port(unauthorized) while not associated
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
Using existing control interface directory.
ctrl_iface bind(PF_UNIX) failed: Address already in use
ctrl_iface exists, but does not allow connections - assuming it was
leftover from forced program termination
Successfully replaced leftover ctrl_iface socket
'/var/run/wpa_supplicant/wlan0'
wlan0: Added interface wlan0
wlan0: State: DISCONNECTED -> DISCONNECTED
nl80211: Set wlan0 operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=5
(IF_OPER_DORMANT)
wlan0: State: DISCONNECTED -> SCANNING
wlan0: Starting AP scan for wildcard SSID
wlan0: Add radio work 'scan'@0xfab20
wlan0: First radio work item in the queue - schedule start immediately
random: Got 20/20 bytes from /dev/random
wlan0: Starting radio work 'scan'@0xfab20 after 0.000397 second wait
wlan0: nl80211: scan request
nl80211: Scan SSID - hexdump_ascii(len=0): [NULL]
Scan requested (ret=0) - scan timeout 10 seconds
RTM_NEWLINK: ifi_index=3 ifname=wlan0 operstate=2 linkmode=1
ifi_family=0 ifi_flags=0x1003 ([UP])
nl80211: Event message available
nl80211: Drv Event 33 (NL80211_CMD_TRIGGER_SCAN) received for wlan0
wlan0: nl80211: Scan trigger
wlan0: Event SCAN_STARTED (49) received
wlan0: Own scan request started a scan in 0.001068 seconds
EAPOL: disable timer tick
nl80211: Event message available
nl80211: Drv Event 34 (NL80211_CMD_NEW_SCAN_RESULTS) received for wlan0
wlan0: nl80211: New scan results available
nl80211: Scan probed for SSID ''
nl80211: Scan included frequencies: 2412 2417 2422 2427 2432 2437 2442
2447 2452 2457 2462 2467 2472 2484
wlan0: Event SCAN_RESULTS (3) received
wlan0: Scan completed in 1.139381 seconds
nl80211: Received scan results (1 BSSes)
wlan0: BSS: Start scan result update 1
wlan0: BSS: Add new id 0 BSSID 72:27:24:39:87:d1 SSID ''
BSS: last_scan_res_used=1/32
wlan0: New scan results available (own=1 ext=0)
wlan0: Radio work 'scan'@0xfab20 done in 1.199959 seconds
wlan0: Selecting BSS from priority group 10
wlan0: 0: 72:27:24:39:87:d1 ssid='' wpa_ie_len=22 rsn_ie_len=24
caps=0x1431 level=-79
wlan0:    skip - SSID not known
wlan0: No suitable network found
wlan0: Setup a new network
wlan0: Add radio work 'connect'@0xfab20
wlan0: First radio work item in the queue - schedule start immediately
wlan0: Starting radio work 'connect'@0xfab20 after 0.000274 second wait
wlan0: Trying to associate with SSID 'my-net-302'
wlan0: Cancelling scan request
wlan0: WPA: clearing own WPA/RSN IE
wlan0: Automatic auth_alg selection: 0x1
wlan0: WPA: clearing AP WPA IE
wlan0: WPA: clearing AP RSN IE
wlan0: WPA: clearing own WPA/RSN IE
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=1 addr=(nil) key_idx=0
set_tx=1 seq_len=0 key_len=5
nl80211: KEY_DATA - hexdump(len=5): [REMOVED]
nl80211: set_key failed; err=-67 Link has been severed)
wlan0: State: SCANNING -> ASSOCIATING
nl80211: Set wlan0 operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=5
(IF_OPER_DORMANT)
nl80211: Join IBSS (ifindex=3)
nl80211: Set mode ifindex 3 iftype 1 (ADHOC)
nl80211: Unsubscribe mgmt frames handle 0x888710e9 (mode change)
nl80211: Subscribe to mgmt frames with non-AP handle 0xf9860
nl80211: Register frame type=0xb0 (WLAN_FC_STYPE_AUTH) nl_handle=0xf9860
match=
nl80211: Register frame command failed (type=176): ret=-95 (Operation
not supported)
nl80211: Register frame match - hexdump(len=0): [NULL]
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
nl_handle=0xf9860 match=06
nl80211: Register frame command failed (type=208): ret=-95 (Operation
not supported)
nl80211: Register frame match - hexdump(len=1): 06
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
nl_handle=0xf9860 match=0a07
nl80211: Register frame command failed (type=208): ret=-95 (Operation
not supported)
nl80211: Register frame match - hexdump(len=2): 0a 07
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
nl_handle=0xf9860 match=0a11
nl80211: Register frame command failed (type=208): ret=-95 (Operation
not supported)
nl80211: Register frame match - hexdump(len=2): 0a 11
nl80211: Failed to register Action frame processing - ignore for now
  * SSID - hexdump_ascii(len=10):
     6d 79 2d 6e 65 74 2d 33 30 32                     my-net-302      
  * freq=2412
  * ht_enabled=0
  * sec_channel_offset=0
  * vht_enabled=0
  * center_freq1=0
  * center_freq2=0
  * bandwidth=0
  * Extra IEs for Beacon/Probe Response frames - hexdump(len=0):
nl80211: Join IBSS request sent successfully
wlan0: Setting authentication timeout: 20 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=ForceAuthorized
RTM_NEWLINK: ifi_index=3 ifname=wlan0 operstate=5 linkmode=1
ifi_family=0 ifi_flags=0x11003 ([UP][LOWER_UP])
nl80211: Event message available
nl80211: Drv Event 43 (NL80211_CMD_JOIN_IBSS) received for wlan0
nl80211: IBSS 12:24:21:59:87:d0 joined
nl80211: IBSS-joined on 2412 MHz
nl80211: Operating frequency for the associated BSS from scan results:
2412 MHz
nl80211: IBSS on frequency 2412 MHz
wlan0: Event ASSOC (0) received
wlan0: State: ASSOCIATING -> ASSOCIATED
nl80211: Set wlan0 operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=5
(IF_OPER_DORMANT)
wlan0: Associated to a new BSS: BSSID=12:24:21:59:87:d0
nl80211: IBSS-joined on 2412 MHz
nl80211: Received scan results (2 BSSes)
wlan0: BSS: Start scan result update 2
wlan0: BSS: Add new id 1 BSSID 12:24:21:59:87:d0 SSID 'my-net-302'
wlan0: Associated with 12:24:21:59:87:d0
wlan0: WPA: Association event - clear replay counter
wlan0: WPA: Clear old PTK
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
EAPOL: External notification - portEnabled=1
EAPOL: SUPP_PAE entering state S_FORCE_AUTH
EAPOL: Supplicant port status: Authorized
nl80211: Set supplicant port authorized for 12:24:21:59:87:d0
nl80211: Failed to set STA flag: -95 (Operation not supported)
EAPOL: SUPP_BE entering state IDLE
wlan0: Cancelling authentication timeout
wlan0: State: ASSOCIATED -> COMPLETED
wlan0: Radio work 'connect'@0xfab20 done in 0.603215 seconds
wlan0: CTRL-EVENT-CONNECTED - Connection to 12:24:21:59:87:d0 completed
[id=0 id_str=]
nl80211: Set wlan0 operstate 0->1 (UP)
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=6
(IF_OPER_UP)
wlan0: Cancelling scan request
wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=1 addr=(nil) key_idx=0
set_tx=1 seq_len=0 key_len=5
nl80211: KEY_DATA - hexdump(len=5): [REMOVED]
RTM_NEWLINK: ifi_index=3 ifname=wlan0 operstate=6 linkmode=1
ifi_family=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
wlan0: BSS: Remove id 0 BSSID 72:27:24:39:87:d1 SSID '' due to
wpa_bss_flush_by_age


I noticed that nl80211 driver returns the error:

nl80211: Set supplicant port authorized for 12:24:21:59:87:d0
nl80211: Failed to set STA flag: -95 (Operation not supported)

which seems to be where the issue come from.
I understand this is a driver's problem.

If I comment the line:

wep_key0="password" 

into the configuration file, devices can connect to the network, but
this is unprotected.


Do you know if this is a known problem ?
Is it sure this is a problem from nl80211 driver ?

What I could do to fix this problem ?

Thank you in advance.
Regards

Simon






_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux