mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 08:48:31 -05:00
WPS: Do not update Beacon IEs before initial IE set
This avoids a request to the driver to first start beaconing before the WPA/RSN IE has been generated and then immediately changing the beacon IEs once the WPA/RSN IE is ready.
This commit is contained in:
parent
f10bfc9adb
commit
bc45d4279f
@ -403,6 +403,7 @@ void ieee802_11_set_beacon(struct hostapd_data *hapd)
|
|||||||
if ((hapd->conf->p2p & (P2P_ENABLED | P2P_GROUP_OWNER)) == P2P_ENABLED)
|
if ((hapd->conf->p2p & (P2P_ENABLED | P2P_GROUP_OWNER)) == P2P_ENABLED)
|
||||||
goto no_beacon;
|
goto no_beacon;
|
||||||
#endif /* CONFIG_P2P */
|
#endif /* CONFIG_P2P */
|
||||||
|
hapd->beacon_set_done = 1;
|
||||||
|
|
||||||
#define BEACON_HEAD_BUF_SIZE 256
|
#define BEACON_HEAD_BUF_SIZE 256
|
||||||
#define BEACON_TAIL_BUF_SIZE 512
|
#define BEACON_TAIL_BUF_SIZE 512
|
||||||
|
@ -115,6 +115,7 @@ struct hostapd_data {
|
|||||||
struct l2_packet_data *l2;
|
struct l2_packet_data *l2;
|
||||||
struct wps_context *wps;
|
struct wps_context *wps;
|
||||||
|
|
||||||
|
int beacon_set_done;
|
||||||
struct wpabuf *wps_beacon_ie;
|
struct wpabuf *wps_beacon_ie;
|
||||||
struct wpabuf *wps_probe_resp_ie;
|
struct wpabuf *wps_probe_resp_ie;
|
||||||
#ifdef CONFIG_WPS
|
#ifdef CONFIG_WPS
|
||||||
|
@ -141,7 +141,8 @@ static int hostapd_wps_set_ie_cb(void *ctx, struct wpabuf *beacon_ie,
|
|||||||
hapd->wps_beacon_ie = beacon_ie;
|
hapd->wps_beacon_ie = beacon_ie;
|
||||||
wpabuf_free(hapd->wps_probe_resp_ie);
|
wpabuf_free(hapd->wps_probe_resp_ie);
|
||||||
hapd->wps_probe_resp_ie = probe_resp_ie;
|
hapd->wps_probe_resp_ie = probe_resp_ie;
|
||||||
ieee802_11_set_beacon(hapd);
|
if (hapd->beacon_set_done)
|
||||||
|
ieee802_11_set_beacon(hapd);
|
||||||
return hostapd_set_ap_wps_ie(hapd);
|
return hostapd_set_ap_wps_ie(hapd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user