eiwd

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

commit e798d4fe9dd54632e921289c38fd0fbdfe97397f
parent ea16ade5e0d15e41d1f8c672cb6840f65ad2d0cc
Author: James Prestwood <prestwoj@gmail.com>
Date:   Wed, 22 Sep 2021 12:34:16 -0700

scan: validate OWE transition operating class/channel

If the IE's operating class and channel doesn't validate don't bother
storing the IE at all.

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

diff --git a/src/scan.c b/src/scan.c @@ -49,6 +49,7 @@ #include "src/util.h" #include "src/p2putil.h" #include "src/mpdu.h" +#include "src/band.h" #include "src/scan.h" /* User configurable options */ @@ -1060,14 +1061,18 @@ static void scan_parse_vendor_specific(struct scan_bss *bss, const void *data, } if (is_ie_wfa_ie(data, len, IE_WFA_OI_OWE_TRANSITION)) { - bss->owe_trans = l_new(struct ie_owe_transition_info, 1); + _auto_(l_free) struct ie_owe_transition_info *owe_trans = + l_new(struct ie_owe_transition_info, 1); - if (ie_parse_owe_transition(data - 2, len + 2, - bss->owe_trans) < 0) { - l_free(bss->owe_trans); - bss->owe_trans = NULL; - } + if (ie_parse_owe_transition(data - 2, len + 2, owe_trans) < 0) + return; + + if (owe_trans->oper_class && + oci_to_frequency(owe_trans->oper_class, + owe_trans->channel) < 0) + return; + bss->owe_trans = l_steal_ptr(owe_trans); return; }