mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-21 11:52:34 +01:00
handshake: Add handshake_state_set_protocol_version
This commit is contained in:
parent
f7e23b3512
commit
d984c605f7
@ -268,6 +268,21 @@ void handshake_state_set_fils_ft(struct handshake_state *s,
|
|||||||
s->fils_ft_len = fils_ft_len;
|
s->fils_ft_len = fils_ft_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Override the protocol version used for EAPoL packets. The selection is as
|
||||||
|
* follows:
|
||||||
|
* 0 -> Automatic, use same proto as the request for the response and
|
||||||
|
* 2004 when in authenticator mode
|
||||||
|
* 1 -> Chooses 2001 Protocol Version
|
||||||
|
* 2 -> Chooses 2004 Protocol Version
|
||||||
|
* 3 -> Chooses 2010 Protocol Version
|
||||||
|
*/
|
||||||
|
void handshake_state_set_protocol_version(struct handshake_state *s,
|
||||||
|
uint8_t proto_version)
|
||||||
|
{
|
||||||
|
s->proto_version = proto_version;
|
||||||
|
}
|
||||||
|
|
||||||
void handshake_state_new_snonce(struct handshake_state *s)
|
void handshake_state_new_snonce(struct handshake_state *s)
|
||||||
{
|
{
|
||||||
get_nonce(s->snonce);
|
get_nonce(s->snonce);
|
||||||
|
@ -120,6 +120,7 @@ struct handshake_state {
|
|||||||
uint8_t r1khid[6];
|
uint8_t r1khid[6];
|
||||||
uint8_t gtk[32];
|
uint8_t gtk[32];
|
||||||
uint8_t gtk_rsc[6];
|
uint8_t gtk_rsc[6];
|
||||||
|
uint8_t proto_version : 2;
|
||||||
unsigned int gtk_index;
|
unsigned int gtk_index;
|
||||||
struct erp_cache_entry *erp_cache;
|
struct erp_cache_entry *erp_cache;
|
||||||
void *user_data;
|
void *user_data;
|
||||||
@ -167,6 +168,9 @@ void handshake_state_set_fils_ft(struct handshake_state *s,
|
|||||||
const uint8_t *fils_ft,
|
const uint8_t *fils_ft,
|
||||||
size_t fils_ft_len);
|
size_t fils_ft_len);
|
||||||
|
|
||||||
|
void handshake_state_set_protocol_version(struct handshake_state *s,
|
||||||
|
uint8_t proto_version);
|
||||||
|
|
||||||
void handshake_state_new_snonce(struct handshake_state *s);
|
void handshake_state_new_snonce(struct handshake_state *s);
|
||||||
void handshake_state_new_anonce(struct handshake_state *s);
|
void handshake_state_new_anonce(struct handshake_state *s);
|
||||||
void handshake_state_set_anonce(struct handshake_state *s,
|
void handshake_state_set_anonce(struct handshake_state *s,
|
||||||
|
Loading…
Reference in New Issue
Block a user