mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-29 10:48:22 -05:00
ad08c3633c
This adds WPS support for both hostapd and wpa_supplicant. Both programs can be configured to act as WPS Enrollee and Registrar. Both PBC and PIN methods are supported. Currently, hostapd has more complete configuration option for WPS parameters and wpa_supplicant configuration style will likely change in the future. External Registrars are not yet supported in hostapd or wpa_supplicant. While wpa_supplicant has initial support for acting as an Registrar to configure an AP, this is still using number of hardcoded parameters which will need to be made configurable for proper operation.
40 lines
1003 B
C
40 lines
1003 B
C
/*
|
|
* EAP-WSC common routines for Wi-Fi Protected Setup
|
|
* Copyright (c) 2007, Jouni Malinen <j@w1.fi>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*
|
|
* Alternatively, this software may be distributed under the terms of BSD
|
|
* license.
|
|
*
|
|
* See README and COPYING for more details.
|
|
*/
|
|
|
|
#include "includes.h"
|
|
|
|
#include "common.h"
|
|
#include "eap_defs.h"
|
|
#include "eap_common.h"
|
|
#include "wps/wps.h"
|
|
#include "eap_wsc_common.h"
|
|
|
|
struct wpabuf * eap_wsc_build_frag_ack(u8 id, u8 code)
|
|
{
|
|
struct wpabuf *msg;
|
|
|
|
msg = eap_msg_alloc(EAP_VENDOR_WFA, EAP_VENDOR_TYPE_WSC, 2, code, id);
|
|
if (msg == NULL) {
|
|
wpa_printf(MSG_ERROR, "EAP-WSC: Failed to allocate memory for "
|
|
"FRAG_ACK");
|
|
return NULL;
|
|
}
|
|
|
|
wpa_printf(MSG_DEBUG, "EAP-WSC: Send WSC/FRAG_ACK");
|
|
wpabuf_put_u8(msg, WSC_FRAG_ACK); /* Op-Code */
|
|
wpabuf_put_u8(msg, 0); /* Flags */
|
|
|
|
return msg;
|
|
}
|