From: Ilan Peer Date: Sun, 3 Nov 2013 13:30:27 +0000 (+0200) Subject: wpa_supplicant: Fix bug in get_shared_radio_freqs X-Git-Tag: hostap_2_1~625 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9804873e53decfed87d5a9a12518c25106e383be;p=thirdparty%2Fhostap.git wpa_supplicant: Fix bug in get_shared_radio_freqs 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 --- diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 3abe460d6..c058a6e73 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -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;