mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 21:22:37 +01:00
sae: Drop unneeded state checks
Now that sae_verify_* methods no longer allow dropped frames though, there's no reason to keep these checks. sae_process_commit and sae_process_confirm will now always receive messages in their respective state.
This commit is contained in:
parent
0925a362d6
commit
fefa93e3ba
10
src/sae.c
10
src/sae.c
@ -488,11 +488,6 @@ static int sae_process_commit(struct sae_sm *sm, const uint8_t *from,
|
||||
struct l_ecc_scalar *order;
|
||||
unsigned int nbytes = l_ecc_curve_get_scalar_bytes(sm->curve);
|
||||
|
||||
if (sm->state != SAE_STATE_COMMITTED) {
|
||||
l_error("bad state %u", sm->state);
|
||||
goto reject;
|
||||
}
|
||||
|
||||
ptr += 2;
|
||||
|
||||
sm->p_scalar = l_ecc_scalar_new(sm->curve, ptr, nbytes);
|
||||
@ -614,11 +609,6 @@ static int sae_process_confirm(struct sae_sm *sm, const uint8_t *from,
|
||||
{
|
||||
const uint8_t *ptr = frame;
|
||||
|
||||
if (sm->state != SAE_STATE_CONFIRMED) {
|
||||
l_error("bad state %u", sm->state);
|
||||
goto reject;
|
||||
}
|
||||
|
||||
if (len < 34) {
|
||||
l_error("bad length");
|
||||
goto reject;
|
||||
|
Loading…
Reference in New Issue
Block a user