aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2016-10-27 12:18:26 (GMT)
committerJouni Malinen <j@w1.fi>2016-10-29 16:28:37 (GMT)
commitd044d2f7d81a5e1456bd9385257c858f10fcaad8 (patch)
tree4817cce40fab3c509fa80e62d41fef8e388c51d4 /wpa_supplicant
parentbaa8f5ba26f17266930dcf2db6fa4bc97e3e371c (diff)
downloadhostap-d044d2f7d81a5e1456bd9385257c858f10fcaad8.zip
hostap-d044d2f7d81a5e1456bd9385257c858f10fcaad8.tar.gz
hostap-d044d2f7d81a5e1456bd9385257c858f10fcaad8.tar.bz2
wpa_supplicant: Get scan_result IE also from Beacon frames
No reason to require ie_len if only beacon_ie_len is given. Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/scan.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index bfde0af..172772d 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -1618,7 +1618,13 @@ static int wpa_scan_get_max_rate(const struct wpa_scan_res *res)
*/
const u8 * wpa_scan_get_ie(const struct wpa_scan_res *res, u8 ie)
{
- return get_ie((const u8 *) (res + 1), res->ie_len, ie);
+ size_t ie_len = res->ie_len;
+
+ /* Use the Beacon frame IEs if res->ie_len is not available */
+ if (!ie_len)
+ ie_len = res->beacon_ie_len;
+
+ return get_ie((const u8 *) (res + 1), ie_len, ie);
}