All of lore.kernel.org
 help / color / mirror / Atom feed
* hostapd: config_reload: Switch from WPA to open leaves keys
@ 2021-04-21 17:58 Sven Eckelmann
  0 siblings, 0 replies; only message in thread
From: Sven Eckelmann @ 2021-04-21 17:58 UTC (permalink / raw)
  To: hostap; +Cc: ath11k


[-- Attachment #1.1: Type: text/plain, Size: 1547 bytes --]

Hi,

it was noticed that the hostapd runtime switch (config reload) from an AP 
config with a WPA2 PSK to an open AP created a non-working AP interface. The 
driver was ath11k in this case and the client just connected to the open AP 
and tried a link local IPv6 (ping ff02::1%wlan0). The AP could receive the 
unencrypted data but the AP was unable to send back unencrypted (solicitation) 
packets - the multicast data packets were still encrypted

I could see that following happened when changing from PSK to PSK:

* nl80211_new_key
* ...
* ath11k_install_key (DISABLE_KEY)
* ath11k_install_key (SET_KEY)

Nothing like this happened when switching from PSK to Open. It is still 
possible to see the old key in /sys/kernel/debug/ieee80211/phy1/keys/0/

An investigation showed that the relevant code to delete this information from 
the kernel is #ifdef'ed out in hostapd (CONFIG_WEP was not in my config) since 
commit 200c7693c9a1 ("Make WEP functionality an optional build parameter").

If I enable it again then I can see that the key is removed correctly by 
hostapd_broadcast_wep_clear -> hostapd_broadcast_key_clear_iface.

This also triggers the removal in ath11k but it afterwards still not able to 
transmit data to the client because it still encrypts mcast frames. I haven't 
checked this part in detail but at least the re-enabling of this code path
fixed it for ath10k. For ath11k, I still have to restart the whole vif or
otherwise I will only see encrypted multicast frames from the AP (and no 
unicast).

Kind regards,
	Sven




[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 102 bytes --]

-- 
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-22 14:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-21 17:58 hostapd: config_reload: Switch from WPA to open leaves keys Sven Eckelmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.