eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit d984c605f7262fd751e167d065647dfaa7a94bb5
parent f7e23b3512d9504d9dfca29cb7baed3c20c85653
Author: Denis Kenzior <denkenz@gmail.com>
Date:   Mon, 15 Jul 2019 21:45:12 -0500

handshake: Add handshake_state_set_protocol_version

Diffstat:
Msrc/handshake.c | 15+++++++++++++++
Msrc/handshake.h | 4++++
2 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/src/handshake.c b/src/handshake.c @@ -268,6 +268,21 @@ void handshake_state_set_fils_ft(struct handshake_state *s, 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) { get_nonce(s->snonce); diff --git a/src/handshake.h b/src/handshake.h @@ -120,6 +120,7 @@ struct handshake_state { uint8_t r1khid[6]; uint8_t gtk[32]; uint8_t gtk_rsc[6]; + uint8_t proto_version : 2; unsigned int gtk_index; struct erp_cache_entry *erp_cache; void *user_data; @@ -167,6 +168,9 @@ void handshake_state_set_fils_ft(struct handshake_state *s, const uint8_t *fils_ft, 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_anonce(struct handshake_state *s); void handshake_state_set_anonce(struct handshake_state *s,