eiwd

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

commit 41740ceabc6c4989c0acf74b3b4c9d1559ee08dd
parent 20887dfe1afe5702d1d59cc8c7cfce9f75bbb69e
Author: James Prestwood <prestwoj@gmail.com>
Date:   Wed, 21 Aug 2019 15:32:31 -0700

scan: only set Interworking if capable

Checks that the extended capabilities has the Interworking
bit set before adding the IE.

Diffstat:
Msrc/scan.c | 19+++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/src/scan.c b/src/scan.c @@ -303,14 +303,17 @@ static struct l_genl_msg *scan_build_cmd(struct scan_context *sc, iov[iov_elems].iov_len = ext_capa[1] + 2; iov_elems++; - /* Order 12 - Interworking */ - interworking[0] = IE_TYPE_INTERWORKING; - interworking[1] = 1; - interworking[2] = 0; /* Private network, INet=0,ASRA=0,ESR=0,UESA=0 */ - - iov[iov_elems].iov_base = interworking; - iov[iov_elems].iov_len = 3; - iov_elems++; + if (util_is_bit_set(ext_capa[3], 7)) { + /* Order 12 - Interworking */ + interworking[0] = IE_TYPE_INTERWORKING; + interworking[1] = 1; + /* Private network, INet=0,ASRA=0,ESR=0,UESA=0 */ + interworking[2] = 0; + + iov[iov_elems].iov_base = interworking; + iov[iov_elems].iov_len = 3; + iov_elems++; + } /* Order Last (assuming WSC vendor specific) */ if (params->extra_ie && params->extra_ie_size) {