eiwd

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

commit ae538eae7d6d94d30e494871f0143653393f2fe9
parent 8501b2edb19d068994859410b4328754889d1eec
Author: Denis Kenzior <denkenz@gmail.com>
Date:   Sat, 20 Oct 2018 10:38:56 -0500

netdev: Cancel ongoing rekey offload

We need to cancel an ongoing rekey offload in a few additional places
besides the netdev destructor.

Diffstat:
Msrc/netdev.c | 14+++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/src/netdev.c b/src/netdev.c @@ -1027,11 +1027,18 @@ static void netdev_setting_keys_failed(struct netdev_handshake_state *nhs, * 1. new_key(ptk) * 2. new_key(gtk) [optional] * 3. new_key(igtk) [optional] - * 4. set_station + * 4. rekey offload [optional] + * 5. set_station * * Cancel all pending commands, then de-authenticate */ netdev_handshake_state_cancel_all(nhs); + + if (netdev->rekey_offload_cmd_id) { + l_genl_family_cancel(nl80211, netdev->rekey_offload_cmd_id); + netdev->rekey_offload_cmd_id = 0; + } + netdev->result = NETDEV_RESULT_KEY_SETTING_FAILED; handshake_event(&nhs->super, HANDSHAKE_EVENT_SETTING_KEYS_FAILED, NULL); @@ -2943,6 +2950,11 @@ int netdev_fast_transition(struct netdev *netdev, struct scan_bss *target_bss, nhs->group_management_new_key_cmd_id = 0; } + if (netdev->rekey_offload_cmd_id) { + l_genl_family_cancel(nl80211, netdev->rekey_offload_cmd_id); + netdev->rekey_offload_cmd_id = 0; + } + netdev_rssi_polling_update(netdev); return 0;