ATH11K Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: hostap@lists.infradead.org
Cc: ath11k@lists.infradead.org
Subject: hostapd: config_reload: Switch from WPA to open leaves keys
Date: Wed, 21 Apr 2021 19:58:32 +0200	[thread overview]
Message-ID: <7827540.TDG2QzLjjR@ripper> (raw)


[-- 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

                 reply	other threads:[~2021-04-22 14:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7827540.TDG2QzLjjR@ripper \
    --to=sven@narfation.org \
    --cc=ath11k@lists.infradead.org \
    --cc=hostap@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox