Re: [PATCH 1/3] pmksa: add pmksa_cache_flush_ssid
Denis Kenzior <[email protected]> Mon, 23 Mar 2026 10:14:51 -0500
| Newsgroups | dev.linux.lists.iwd |
|---|---|
| Message-ID | <[email protected]> |
Hi James, On 3/19/26 1:05 PM, James Prestwood wrote: > Adds a new flushing method to remove all PMKSA entries for a given > SSID. > --- > src/pmksa.c | 27 +++++++++++++++++++++++++++ > src/pmksa.h | 1 + > 2 files changed, 28 insertions(+) > > diff --git a/src/pmksa.c b/src/pmksa.c > index a50c8208..9b02d7e4 100644 > --- a/src/pmksa.c > +++ b/src/pmksa.c > @@ -213,6 +213,33 @@ int pmksa_cache_flush(void) > return 0; > } > > +/* > + * Flushes all PMKSA entries that match an SSID > + */ > +int pmksa_cache_flush_ssid(const char ssid[static 32]) const char is confusing here. Either you're passing in a string (const char *) or you're passing in an array of bytes (uint8_t */[]). pmksa_cache_get() uses const uint8_t *ssid, size_t ssid_len, so maybe use that for consistency? Or we can switch to uint8_t ssid[static 32] everywhere. Also, just ssid is not enough, you need to supply the AKMs to delete. If we're 'forgetting' a PSK network, lets make the effort not to clear out a potential 802.1X network with the same SSID. Regards, -Denis