eiwd

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

commit e7219cbcc5372e7718ac82f1e2282d6d04d37e98
parent ea571bc6ac92118dc729897984b06ec049f27545
Author: James Prestwood <james.prestwood@linux.intel.com>
Date:   Mon, 22 Apr 2019 13:17:43 -0700

netdev: free SAE SM once protocol has completed

SAE was behaving inconsitently with respect to freeing the state.
It was freeing the SM internally on failure, but requiring netdev
free it on success.

This removes the call to sae_sm_free in sae.c upon failure, and
instead netdev frees the SM in the complete callback in all cases
regardless of success or failure.

Diffstat:
Msrc/netdev.c | 4+++-
Msrc/sae.c | 2--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/netdev.c b/src/netdev.c @@ -2577,10 +2577,12 @@ static void netdev_sae_complete(uint16_t status, void *user_data) struct iovec iov[3]; int iov_elems = 0; + sae_sm_free(netdev->sae_sm); + netdev->sae_sm = NULL; + if (status != 0) { l_error("SAE exchange failed on %u result %u", netdev->index, status); - netdev->sae_sm = NULL; goto auth_failed; } diff --git a/src/sae.c b/src/sae.c @@ -157,8 +157,6 @@ static bool sae_cn(const uint8_t *kck, uint16_t send_confirm, static void sae_authentication_failed(struct sae_sm *sm, uint16_t reason) { sm->complete(reason, sm->user_data); - - sae_sm_free(sm); } static void sae_reject_authentication(struct sae_sm *sm, uint16_t reason)