[PATCH 3/3] mesh: Add MESH_PMKSA_GET/ADD commands

Masashi Honma masashi.honma at gmail.com
Mon Jan 2 02:27:41 PST 2017

On 2016年12月31日 19:24, Jouni Malinen wrote:

 >	/* FIX: Why is this loop here? This function is called for a specific
 >	 * STA while the loop here adds PMKSA cache entries for all STAs.
 >	 * Shouldn't this addition be done when starting the mesh rather than
 >	 * when going through a STA-specific SAE initialization? */

Thank you !

Yes. This should be moved to SAE initialization code. I moved it to

 >	/* FIX: Wouldn't this lost the last reference to
 >	 * entry->pmksa_cache and by doing so, leak memory?
 >	 */

Yes. I fixed it to free() even if malloc() was failed. In addition, I 
moved error message output code into wpa_auth_pmksa_add_entry() to 
display peer address.

 >	/* FIX: free entry->pmksa_cache (need pmksa_cache_auth.c
 >	 * changes to do that, e.g., by allowing
 >	 * _pmksa_cache_free_entry() to be called from here or
 >	 * maybe more likely by adding a new wrapper function
 >	 * for this special external cache case). */

Yes. I must free all unused entries... I fixed it.

Masashi Honma.

More information about the Hostap mailing list