]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Skip rate set matching if BSS frequency is not known
authorJouni Malinen <j@w1.fi>
Sun, 30 Oct 2011 09:41:22 +0000 (11:41 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 30 Oct 2011 09:46:13 +0000 (11:46 +0200)
At least with driver_test.c, the BSS table may not include frequency
information. In such a case, we need to skip rate set matching during
BSS selection to avoid rejecting valid AP.

Signed-hostap: Jouni Malinen <j@w1.fi>

wpa_supplicant/events.c

index 74e3bb58fe9a5e9109f8b07717b9a18c3b8fa292..d86fe111869549d7f49705dd7936e50f6167f830 100644 (file)
@@ -503,6 +503,9 @@ static int rate_match(struct wpa_supplicant *wpa_s, struct wpa_scan_res *bss)
        const u8 *rate_ie;
        int i, j, k;
 
+       if (bss->freq == 0)
+               return 1; /* Cannot do matching without knowing band */
+
        modes = wpa_s->hw.modes;
        if (modes == NULL) {
                /*