Encryption problems with nl80211
simo
sazzalin at settopsurvey.com
Mon Nov 2 04:25:05 PST 2015
I finally recompiled the kernel with the option
CONFIG_CFG80211_WEXT=y
This casues me to replace the lib80211,cgf80211,libertas & libertas_sdio
drivers. To be sure I also replaced the rfkill* drivers.
iwconfig now can detect wlan0, which is normal I think..
Most of the ioctl error messages are disappeared (just one is shown..):
ioctl[SIOCSIWPMKSA]: Invalid argument
And I don't understand what this error refers to..
The network is shown as before, unencrypted.
I post the output of the wpa_execution from shell:
$ wpa_supplicant -D wext -i wlan0
-c /etc/wpa_supplicant/wpa_supplicant.conf.ibss-wep -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.ibss-wep' driver 'wext'
ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant/wpa_supplicant.conf.ibss-wep' ->
'/etc/wpa_supplicant/wpa_supplicant.conf.ibss-wep'
Reading configuration file
'/etc/wpa_supplicant/wpa_supplicant.conf.ibss-wep'
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)
priority=5 (0x5)
key_mgmt: 0x4
Priority group 5
id=0 ssid='my-net-302'
WEXT: cfg80211-based driver detected
wext: interface wlan0 phy: phy0
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
ioctl[SIOCSIWPMKSA]: Invalid argument
SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf
capabilities: key_mgmt 0xf enc 0x1f flags 0x0
netlink: Operstate: ifindex=3 linkmode=1 (userspace-control),
operstate=5 (IF_OPER_DORMANT)
Add interface wlan0 to a new radio phy0
wlan0: Own MAC address: 00:19:88:4d:53:ae
wpa_driver_wext_set_key: alg=0 key_idx=0 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=2 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_key: alg=0 key_idx=3 set_tx=0 seq_len=0 key_len=0
wpa_driver_wext_set_countermeasures
wlan0: RSN: flushing PMKID list in the driver
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
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
wlan0: Added interface wlan0
wlan0: State: DISCONNECTED -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=5
(IF_OPER_DORMANT)
random: Got 20/20 bytes from /dev/random
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
WEXT: if_removed already cleared - ignore event
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
WEXT: if_removed already cleared - ignore event
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
WEXT: if_removed already cleared - ignore event
Wireless event: cmd=0x8b06 len=8
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
WEXT: if_removed already cleared - ignore event
Wireless event: cmd=0x8b1a len=8
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
WEXT: if_removed already cleared - ignore event
wlan0: State: DISCONNECTED -> SCANNING
wlan0: Starting AP scan for wildcard SSID
wlan0: Add radio work 'scan'@0xfa458
wlan0: First radio work item in the queue - schedule start immediately
wlan0: Starting radio work 'scan'@0xfa458 after 0.000122 second wait
Scan requested (ret=0) - scan timeout 10 seconds
EAPOL: disable timer tick
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
WEXT: if_removed already cleared - ignore event
Wireless event: cmd=0x8b19 len=8
wlan0: Event SCAN_RESULTS (3) received
Received 301 bytes of scan results (1 BSSes)
wlan0: BSS: Start scan result update 1
wlan0: BSS: Add new id 0 BSSID 02:24:74:76:43:bc SSID 'my-network-302'
BSS: last_scan_res_used=1/32
wlan0: New scan results available (own=0 ext=0)
wlan0: Radio work 'scan'@0xfa458 done in 1.097369 seconds
wlan0: Selecting BSS from priority group 5
wlan0: 0: 02:24:74:76:43:bc ssid='my-network-302' wpa_ie_len=0
rsn_ie_len=0 caps=0x2 level=0
wlan0: skip - SSID mismatch
wlan0: No suitable network found
wlan0: Setup a new network
wlan0: Add radio work 'connect'@0xfa458
wlan0: First radio work item in the queue - schedule start immediately
wlan0: Starting radio work 'connect'@0xfa458 after 0.000153 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
wlan0: State: SCANNING -> ASSOCIATING
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=5
(IF_OPER_DORMANT)
wpa_driver_wext_associate
wpa_driver_wext_set_drop_unencrypted
ioctl[SIOCSIWGENIE]: Operation not supported
wpa_driver_wext_set_psk
wlan0: Association request to the driver failed
wlan0: Setting authentication timeout: 10 sec 0 usec
EAPOL: External notification - EAP success=0
EAPOL: External notification - EAP fail=0
EAPOL: External notification - portControl=ForceAuthorized
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
WEXT: if_removed already cleared - ignore event
Wireless event: cmd=0x8b1a len=8
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
WEXT: if_removed already cleared - ignore event
Wireless event: cmd=0x8b06 len=8
RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
WEXT: if_removed already cleared - ignore event
Wireless event: cmd=0x8b04 len=12
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
WEXT: if_removed already cleared - ignore event
Wireless event: cmd=0x8b1a len=18
RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
WEXT: if_removed already cleared - ignore event
Wireless event: cmd=0x8b15 len=20
Wireless event: new AP: 02:2f:af:53:8c:98
wlan0: Event ASSOC (0) received
wlan0: State: ASSOCIATING -> ASSOCIATED
wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=5
(IF_OPER_DORMANT)
wlan0: Associated to a new BSS: BSSID=02:2f:af:53:8c:98
Received 592 bytes of scan results (2 BSSes)
wlan0: BSS: Start scan result update 2
wlan0: BSS: Add new id 1 BSSID 02:2f:af:53:8c:98 SSID 'my-net-302'
wlan0: Associated with 02:2f:af:53:8c:98
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
EAPOL: SUPP_BE entering state IDLE
wlan0: Cancelling authentication timeout
wlan0: State: ASSOCIATED -> COMPLETED
wlan0: Radio work 'connect'@0xfa458 done in 0.180606 seconds
wlan0: CTRL-EVENT-CONNECTED - Connection to 02:2f:af:53:8c:98 completed
[id=0 id_str=]
wpa_driver_wext_set_operstate: operstate 0->1 (UP)
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=6
(IF_OPER_UP)
wlan0: Cancelling scan request
RTM_NEWLINK: operstate=1 ifi_flags=0x11003 ([UP][LOWER_UP])
netlink: Operstate: ifindex=3 linkmode=-1 (no change), operstate=6
(IF_OPER_UP)
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
WEXT: if_removed already cleared - ignore event
RTM_NEWLINK: operstate=1 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
WEXT: if_removed already cleared - ignore event
Could the problem come from another driver?
Regards,
Simon
On Thu, 2015-10-29 at 19:20 +0100, simo wrote:
> OK Dan,
>
> Thank you for the useful infos and for the help.
>
> PS: I am recompiling the kernel with the config for wext enable.
> I will let you know.
>
> Again, thank you.
> Regards
>
> Simon
>
>
>
> On Wed, 2015-10-28 at 12:57 -0500, Dan Williams wrote:
> > On Wed, 2015-10-28 at 18:21 +0100, simo wrote:
> > > On Wed, 2015-10-28 at 12:03 -0500, Dan Williams wrote:
> > > > Hmm, I'll bet your kernel has CFG80211_WEXT_EXPORT disabled...
> > >
> > > Yes, you're right. The kernel is configured from yocto and I did not
> > > look for this option. I will enable it and I will recompile the kernel.
> > >
> > > I will update this thread with the results as soon as possible.
> > >
> > >
> > > > so with that in mind, the best option is to just get cfg80211 fixed to allow WEP
> > > > keys during create/join for IBSS.
> > > I am sorry Dan, but I don't understand what you mean with "get cfg80211
> > > fixed".
> >
> > The problem is that the kernel's cfg80211/nl80211 API (which libertas
> > uses for WEXT API emulation) does not allow sending the WEP key during
> > the IBSS join. But Libertas requires that. There's no particular
> > reason cfg80211 should have this restriction.
> >
> > Dan
> >
>
>
>
> _______________________________________________
> Hostap mailing list
> Hostap at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/hostap
More information about the Hostap
mailing list