mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-17 17:39:28 +01:00
eapol: Add eapol_init and eapol_exit
This commit is contained in:
parent
2e1e484f95
commit
79bf677e71
18
src/eapol.c
18
src/eapol.c
@ -31,6 +31,9 @@
|
||||
#include "crypto.h"
|
||||
#include "eapol.h"
|
||||
|
||||
struct l_hashmap *state_machines;
|
||||
enum eapol_protocol_version protocol_version = EAPOL_PROTOCOL_VERSION_2004;
|
||||
|
||||
#define VERIFY_IS_ZERO(field) \
|
||||
do { \
|
||||
unsigned int i; \
|
||||
@ -477,3 +480,18 @@ void eapol_sm_set_own_rsn(struct eapol_sm *sm, const uint8_t *rsn_ie,
|
||||
l_free(sm->own_rsn);
|
||||
sm->own_rsn = l_memdup(rsn_ie, len);
|
||||
}
|
||||
|
||||
bool eapol_init()
|
||||
{
|
||||
state_machines = l_hashmap_new();
|
||||
protocol_version = EAPOL_PROTOCOL_VERSION_2004;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool eapol_exit()
|
||||
{
|
||||
l_hashmap_destroy(state_machines, eapol_sm_destroy);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -132,3 +132,6 @@ void eapol_sm_set_ap_rsn(struct eapol_sm *sm, const uint8_t *rsn_ie,
|
||||
size_t len);
|
||||
void eapol_sm_set_own_rsn(struct eapol_sm *sm, const uint8_t *rsn_ie,
|
||||
size_t len);
|
||||
|
||||
bool eapol_init();
|
||||
bool eapol_exit();
|
||||
|
Loading…
Reference in New Issue
Block a user