eiwd

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

commit 8ed043533a93198dd3ee8355099a40b64830802c
parent 057b019550118e90b1ba17920df4f2df2214974b
Author: James Prestwood <james.prestwood@linux.intel.com>
Date:   Mon,  2 Jul 2018 10:26:48 -0700

wsc: register for handshake events

This is a fixup for the AP code merge. wsc.c never registered
for handshake events, so in case of failure it was never calling
netdev_handshake_failed, which caused a double free.

Diffstat:
Msrc/wsc.c | 16++++++++++++++++
1 file changed, 16 insertions(+), 0 deletions(-)

diff --git a/src/wsc.c b/src/wsc.c @@ -384,6 +384,21 @@ static void wsc_netdev_event(struct netdev *netdev, enum netdev_event event, }; } +static void wsc_handshake_event(struct handshake_state *hs, + enum handshake_event event, void *event_data, void *user_data) +{ + struct wsc *wsc = user_data; + + switch (event) { + case HANDSHAKE_EVENT_FAILED: + netdev_handshake_failed(device_get_netdev(wsc->device), + l_get_u16(event_data)); + break; + default: + break; + } +} + static inline enum wsc_rf_band freq_to_rf_band(uint32_t freq) { enum scan_band band; @@ -443,6 +458,7 @@ static void wsc_connect(struct wsc *wsc) } } + handshake_state_set_event_func(hs, wsc_handshake_event, wsc); handshake_state_set_8021x_config(hs, settings); wsc->eap_settings = settings;