3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2025-06-07 22:07:23 +02:00

sae: check return on sae_send_commit()

If this fails, in some cases, -EAGAIN would be returned up to netdev
which would then assume a retry would be done automatically. This
would not in fact happen since it was an internal SAE failure which
would result in the connect method return to never get sent.

Now if sae_send_commit() fails, return -EPROTO which will cause
netdev to fail the connection.
This commit is contained in:
James Prestwood 2025-05-28 12:27:58 -07:00 committed by Denis Kenzior
parent c4718a5355
commit 9dce36fe3d

View File

@ -994,7 +994,8 @@ static int sae_process_anti_clogging(struct sae_sm *sm, const uint8_t *ptr,
sm->token_len = len; sm->token_len = len;
sm->sync = 0; sm->sync = 0;
sae_send_commit(sm, true); if (L_WARN_ON(!sae_send_commit(sm, true)))
return -EPROTO;
return -EAGAIN; return -EAGAIN;
} }
@ -1074,7 +1075,9 @@ static int sae_verify_committed(struct sae_sm *sm, uint16_t transaction,
return -ETIMEDOUT; return -ETIMEDOUT;
sm->sync++; sm->sync++;
sae_send_commit(sm, true);
if (L_WARN_ON(!sae_send_commit(sm, true)))
return -EPROTO;
return -EAGAIN; return -EAGAIN;
} }
@ -1129,7 +1132,9 @@ static int sae_verify_committed(struct sae_sm *sm, uint16_t transaction,
sm->group); sm->group);
sm->sync = 0; sm->sync = 0;
sae_send_commit(sm, false);
if (L_WARN_ON(!sae_send_commit(sm, false)))
return -EPROTO;
return -EAGAIN; return -EAGAIN;
} }
@ -1294,7 +1299,8 @@ static int sae_verify_confirmed(struct sae_sm *sm, uint16_t trans,
sm->sync++; sm->sync++;
sm->sc++; sm->sc++;
sae_send_commit(sm, true); if (L_WARN_ON(!sae_send_commit(sm, true)))
return -EPROTO;
if (!sae_send_confirm(sm)) if (!sae_send_confirm(sm))
return -EPROTO; return -EPROTO;