Hi James,
On 9/22/21 2:34 PM, James Prestwood wrote:
If the IE's operating class and channel doesn't validate
don't bother
storing the IE at all.
---
src/scan.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/scan.c b/src/scan.c
index 54a7bc84..3f36ea3e 100644
--- a/src/scan.c
+++ b/src/scan.c
@@ -1063,11 +1063,19 @@ static void scan_parse_vendor_specific(struct scan_bss *bss,
const void *data,
bss->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;
- }
+ bss->owe_trans) < 0)
+ goto free_owe_trans;
+
+ if (bss->owe_trans->oper_class && oci_to_frequency(
+ bss->owe_trans->oper_class,
+ bss->owe_trans->channel) < 0)
+ goto free_owe_trans;
+
+ return;
+free_owe_trans:
+ l_free(bss->owe_trans);
+ bss->owe_trans = NULL;
return;
I simplified the logic here slightly through the use of _auto_ and l_steal_ptr.
}
Patches 2-4 applied, thanks.
Regards,
-Denis