]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Reassemble WPS IE(s) in (Re)Association Request if needed
authorJouni Malinen <jouni.malinen@atheros.com>
Wed, 26 May 2010 15:17:13 +0000 (18:17 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 26 May 2010 15:17:13 +0000 (18:17 +0300)
Use a function that will take care of possible (though, very unlikely)
fragmentation of WPS TLVs in (Re)Association Request frames.

src/ap/ieee802_11.c

index 02baddd4cb98e4842aa44badae009df26b093f48..22656237db9dd7522ec99ead944c2d628d159c12 100644 (file)
@@ -686,8 +686,8 @@ static u16 check_assoc_ies(struct hostapd_data *hapd, struct sta_info *sta,
                           "Request - assume WPS is used");
                sta->flags |= WLAN_STA_WPS;
                wpabuf_free(sta->wps_ie);
-               sta->wps_ie = wpabuf_alloc_copy(elems.wps_ie + 4,
-                                               elems.wps_ie_len - 4);
+               sta->wps_ie = ieee802_11_vendor_ie_concat(ies, ies_len,
+                                                         WPS_IE_VENDOR_TYPE);
                wpa_ie = NULL;
                wpa_ie_len = 0;
        } else if (hapd->conf->wps_state && wpa_ie == NULL) {