]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Fix wnm-fuzzer by adding dummy configuration
authorJouni Malinen <j@w1.fi>
Sun, 10 Feb 2019 15:55:42 +0000 (17:55 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 11 Feb 2019 00:35:29 +0000 (02:35 +0200)
Some of the WNM implementation expects configuration to be available
(e.g., ieee802_!1_rx_wnm_coloc_intf_req() dereferences wpa_s->conf), so
add a dummy configuration to allow the fuzzer tool to be used.

Signed-off-by: Jouni Malinen <j@w1.fi>
tests/wnm-fuzzer/wnm-fuzzer.c

index 8efa3115568d520aed7f67f4744ce81410eb6dcf..de74b6bf912075ac9c5d0328ab953bf3ae844047 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * wpa_supplicant - WNM fuzzer
- * Copyright (c) 2015, Jouni Malinen <j@w1.fi>
+ * Copyright (c) 2015-2019, Jouni Malinen <j@w1.fi>
  *
  * This software may be distributed under the terms of the BSD license.
  * See README for more details.
@@ -16,6 +16,7 @@
 #include "../../wpa_supplicant/wpa_supplicant_i.h"
 #include "../../wpa_supplicant/bss.h"
 #include "../../wpa_supplicant/wnm_sta.h"
+#include "../../wpa_supplicant/config.h"
 
 
 struct arg_ctx {
@@ -24,6 +25,7 @@ struct arg_ctx {
        struct wpa_bss bss;
        struct wpa_driver_ops driver;
        struct wpa_sm wpa;
+       struct wpa_config conf;
 };
 
 
@@ -60,6 +62,7 @@ static int init_wpa(struct arg_ctx *ctx)
        ctx->wpa_s.current_bss = &ctx->bss;
        ctx->wpa_s.driver = &ctx->driver;
        ctx->wpa_s.wpa = &ctx->wpa;
+       ctx->wpa_s.conf = &ctx->conf;
 
        return 0;
 }