mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-17 18:34:03 -05:00
WPS: Allow fragment size to be configured
This commit is contained in:
parent
24f7694062
commit
f3a3e6987e
@ -1923,6 +1923,15 @@ const char * eap_get_config_phase2(struct eap_sm *sm)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int eap_get_config_fragment_size(struct eap_sm *sm)
|
||||||
|
{
|
||||||
|
struct eap_peer_config *config = eap_get_config(sm);
|
||||||
|
if (config == NULL)
|
||||||
|
return -1;
|
||||||
|
return config->fragment_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* eap_key_available - Get key availability (eapKeyAvailable variable)
|
* eap_key_available - Get key availability (eapKeyAvailable variable)
|
||||||
* @sm: Pointer to EAP state machine allocated with eap_peer_sm_init()
|
* @sm: Pointer to EAP state machine allocated with eap_peer_sm_init()
|
||||||
|
@ -345,6 +345,7 @@ const u8 * eap_get_config_otp(struct eap_sm *sm, size_t *len);
|
|||||||
void eap_clear_config_otp(struct eap_sm *sm);
|
void eap_clear_config_otp(struct eap_sm *sm);
|
||||||
const char * eap_get_config_phase1(struct eap_sm *sm);
|
const char * eap_get_config_phase1(struct eap_sm *sm);
|
||||||
const char * eap_get_config_phase2(struct eap_sm *sm);
|
const char * eap_get_config_phase2(struct eap_sm *sm);
|
||||||
|
int eap_get_config_fragment_size(struct eap_sm *sm);
|
||||||
struct eap_peer_config * eap_get_config(struct eap_sm *sm);
|
struct eap_peer_config * eap_get_config(struct eap_sm *sm);
|
||||||
void eap_set_config_blob(struct eap_sm *sm, struct wpa_config_blob *blob);
|
void eap_set_config_blob(struct eap_sm *sm, struct wpa_config_blob *blob);
|
||||||
const struct wpa_config_blob *
|
const struct wpa_config_blob *
|
||||||
|
@ -219,7 +219,11 @@ static void * eap_wsc_init(struct eap_sm *sm)
|
|||||||
os_free(data);
|
os_free(data);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
data->fragment_size = WSC_FRAGMENT_SIZE;
|
res = eap_get_config_fragment_size(sm);
|
||||||
|
if (res > 0)
|
||||||
|
data->fragment_size = res;
|
||||||
|
else
|
||||||
|
data->fragment_size = WSC_FRAGMENT_SIZE;
|
||||||
|
|
||||||
if (registrar && cfg.pin) {
|
if (registrar && cfg.pin) {
|
||||||
wps_registrar_add_pin(data->wps_ctx->registrar, NULL,
|
wps_registrar_add_pin(data->wps_ctx->registrar, NULL,
|
||||||
|
Loading…
Reference in New Issue
Block a user