eiwd

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

commit aba3da32ac847a6d430f917855d30ae34af6cc90
parent 5576722d2930c720c5ae867b194d5119b0bf7169
Author: Denis Kenzior <denkenz@gmail.com>
Date:   Thu,  2 Apr 2020 00:45:55 -0500

netdev: work around APs that send igtk in big endian

It seems some APs send the IGTK key in big endian format (it is a
uin16).  The kernel rightly reports an -EINVAL error when iwd issues a
NEW_KEY with such a value, resulting in the connection being aborted.

Work around this by trying to detect big-endian key indexes and 'fixing'
them up.

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

diff --git a/src/netdev.c b/src/netdev.c @@ -1297,6 +1297,14 @@ static void netdev_set_igtk(struct handshake_state *hs, uint16_t key_index, return; } + if (key_index == 0x0400 || key_index == 0x0500) { + l_warn("Received an invalid IGTK key index (%04hx)" + " that is likely in" + " big endian format. Trying to fix and" + " proceed anyway", key_index); + key_index = bswap_16(key_index); + } + msg = nl80211_build_new_key_group(netdev->index, cipher, key_index, igtk_buf, igtk_len, ipn, ipn_len, NULL);