]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Remove unnecessary wpa_ie_len check from wpa_parse_wpa_ie_wpa()
authorJouni Malinen <j@w1.fi>
Sat, 20 Jun 2015 19:50:45 +0000 (22:50 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 20 Jun 2015 20:04:31 +0000 (23:04 +0300)
There is no need to have a separate "fail silently" case for wpa_ie_len
== 0. That condition does not seem to be reachable and even if it were,
the following "ie len too short" case will result in the exact same
return value.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/common/wpa_common.c

index 2bac377ca46bec75d150f894336421669a5afa99..e485b5bf213c6f919e7f64639a4b51d8099d1a37 100644 (file)
@@ -727,11 +727,6 @@ int wpa_parse_wpa_ie_wpa(const u8 *wpa_ie, size_t wpa_ie_len,
        data->num_pmkid = 0;
        data->mgmt_group_cipher = 0;
 
-       if (wpa_ie_len == 0) {
-               /* No WPA IE - fail silently */
-               return -1;
-       }
-
        if (wpa_ie_len < sizeof(struct wpa_ie_hdr)) {
                wpa_printf(MSG_DEBUG, "%s: ie len too short %lu",
                           __func__, (unsigned long) wpa_ie_len);