]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
wpa_supplicant: Fix bug in get_shared_radio_freqs
authorIlan Peer <ilan.peer@intel.com>
Sun, 3 Nov 2013 13:30:27 +0000 (15:30 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 5 Nov 2013 08:55:22 +0000 (10:55 +0200)
The idx variable was mistakenly set to 0 at the beginning of the
interface iteration. This could result in the operating channel of the
interface calling the function from being removed from the returned
frequency array if other interfaces were operating.

Signed-hostap: Ilan Peer <ilan.peer@intel.com>

wpa_supplicant/wpa_supplicant.c

index 3abe460d6cfb89700344174b675d4228f0429dc5..c058a6e736f14359e36c6cd9b071c4c7c756fba5 100644 (file)
@@ -4046,7 +4046,7 @@ int get_shared_radio_freqs(struct wpa_supplicant *wpa_s,
        if (rn == NULL || rn[0] == '\0')
                return idx;
 
-       for (ifs = wpa_s->global->ifaces, idx = 0; ifs && idx < len;
+       for (ifs = wpa_s->global->ifaces; ifs && idx < len;
             ifs = ifs->next) {
                if (wpa_s == ifs || !ifs->driver->get_radio_name)
                        continue;