eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit 0925a362d6a26abea7b0517f97edda2f92f33ebe
parent 3474953d1623dd3f9671e883835589f46b9cfd5d
Author: Denis Kenzior <denkenz@gmail.com>
Date:   Sat, 10 Jul 2021 19:15:51 -0500

sae: Return an error when dropping frames

sae_verify_* functions were correctly marking frames to be dropped, but
were returning 0, which caused the to-be-dropped frames to be further
processed inside sae_rx_authenticate.  Fix that by returning a proper
error.

Diffstat:
Msrc/sae.c | 14+++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/sae.c b/src/sae.c @@ -860,9 +860,10 @@ static int sae_verify_committed(struct sae_sm *sm, uint16_t transaction, default: /* * If the Status is some other nonzero value, the frame shall - * be silently discarded... + * be silently discarded and the t0 (retransmission) timer + * shall be set. */ - return 0; + return -ENOMSG; } reject_unsupp_group: @@ -882,10 +883,13 @@ static int sae_verify_confirmed(struct sae_sm *sm, uint16_t trans, return 0; /* - * If the Status is nonzero, the frame shall be silently discarded... + * Upon receipt of a Com event, the t0 (retransmission) timer shall be + * canceled. If the Status is nonzero, the frame shall be silently + * discarded, the t0 (retransmission) timer set, and the protocol + * instance shall remain in the Confirmed state. */ if (status != 0) - return 0; + return -ENOMSG; /* * If Sync is greater than dot11RSNASAESync, the protocol instance @@ -900,7 +904,7 @@ static int sae_verify_confirmed(struct sae_sm *sm, uint16_t trans, /* frame shall be silently discarded */ if (l_get_le16(frame) != sm->group) - return 0; + return -EBADMSG; /* * the protocol instance shall increment Sync, increment Sc, and