]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Allow LCI request with no subelements
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 3 Jan 2017 12:58:14 +0000 (14:58 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 3 Jan 2017 17:53:03 +0000 (19:53 +0200)
Allow shorter request since the subelements are optional to include.
Also print the hexdump of the subelements into debug log.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
wpa_supplicant/rrm.c

index 085d613d7c56473c9c61686a47537e4dc4022aea..7a10a00fc0e3e948291a2da5797ad062cef55d45 100644 (file)
@@ -314,7 +314,7 @@ wpas_rrm_build_lci_report(struct wpa_supplicant *wpa_s,
        const u8 *request = req->variable;
        size_t len = req->len - 3;
 
-       if (len < 4)
+       if (len < 1)
                return -1;
 
        if (!wpa_s->lci)
@@ -333,6 +333,7 @@ wpas_rrm_build_lci_report(struct wpa_supplicant *wpa_s,
        }
 
        /* Subelements are formatted exactly like elements */
+       wpa_hexdump(MSG_DEBUG, "LCI request subelements", request, len);
        subelem = get_ie(request, len, LCI_REQ_SUBELEM_MAX_AGE);
        if (subelem && subelem[1] == 2)
                max_age = WPA_GET_LE16(subelem + 2);