3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-10-04 02:18:49 +02:00

sae: Don't destroy token on group change

There's no reason why a change in groups would result in the
anti-clogging token becoming invalid.  This might result in us needing
an extra round-trip if the peer is using countermeasures and our
requested group was deemed unsuitable.
This commit is contained in:
Denis Kenzior 2021-07-09 23:32:19 -05:00
parent c02b1466c4
commit a46269d5b0

View File

@ -120,9 +120,6 @@ static void sae_rejected_groups_append(struct sae_sm *sm, uint16_t group)
static void sae_reset_state(struct sae_sm *sm) static void sae_reset_state(struct sae_sm *sm)
{ {
l_free(sm->token);
sm->token = NULL;
l_ecc_scalar_free(sm->scalar); l_ecc_scalar_free(sm->scalar);
sm->scalar = NULL; sm->scalar = NULL;
l_ecc_scalar_free(sm->p_scalar); l_ecc_scalar_free(sm->p_scalar);
@ -1314,6 +1311,9 @@ static void sae_free(struct auth_proto *ap)
sae_reset_state(sm); sae_reset_state(sm);
l_free(sm->token);
sm->token = NULL;
if (sm->rejected_groups) if (sm->rejected_groups)
free(sm->rejected_groups); free(sm->rejected_groups);