mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 13:02:44 +01:00
eapol: utilize IWD_MODULE
This converts eapol to using IWD modules. The init/exit APIs did need to remain exposed for unit tests. Netdev was updated to depend on eapol.
This commit is contained in:
parent
cb57d44cb4
commit
369c5fbd0b
11
src/eapol.c
11
src/eapol.c
@ -40,6 +40,7 @@
|
|||||||
#include "src/handshake.h"
|
#include "src/handshake.h"
|
||||||
#include "src/watchlist.h"
|
#include "src/watchlist.h"
|
||||||
#include "src/erp.h"
|
#include "src/erp.h"
|
||||||
|
#include "src/iwd.h"
|
||||||
|
|
||||||
static struct l_queue *state_machines;
|
static struct l_queue *state_machines;
|
||||||
static struct l_queue *preauths;
|
static struct l_queue *preauths;
|
||||||
@ -2705,16 +2706,16 @@ void __eapol_set_config(struct l_settings *config)
|
|||||||
eapol_4way_handshake_time = 5;
|
eapol_4way_handshake_time = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool eapol_init()
|
int eapol_init(void)
|
||||||
{
|
{
|
||||||
state_machines = l_queue_new();
|
state_machines = l_queue_new();
|
||||||
preauths = l_queue_new();
|
preauths = l_queue_new();
|
||||||
watchlist_init(&frame_watches, &eapol_frame_watch_ops);
|
watchlist_init(&frame_watches, &eapol_frame_watch_ops);
|
||||||
|
|
||||||
return true;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool eapol_exit()
|
void eapol_exit(void)
|
||||||
{
|
{
|
||||||
if (!l_queue_isempty(state_machines))
|
if (!l_queue_isempty(state_machines))
|
||||||
l_warn("stale eapol state machines found");
|
l_warn("stale eapol state machines found");
|
||||||
@ -2727,6 +2728,6 @@ bool eapol_exit()
|
|||||||
l_queue_destroy(preauths, preauth_sm_destroy);
|
l_queue_destroy(preauths, preauth_sm_destroy);
|
||||||
|
|
||||||
watchlist_destroy(&frame_watches);
|
watchlist_destroy(&frame_watches);
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IWD_MODULE(eapol, eapol_init, eapol_exit);
|
||||||
|
@ -128,5 +128,5 @@ struct preauth_sm *eapol_preauth_start(const uint8_t *aa,
|
|||||||
eapol_preauth_destroy_func_t destroy);
|
eapol_preauth_destroy_func_t destroy);
|
||||||
void eapol_preauth_cancel(uint32_t ifindex);
|
void eapol_preauth_cancel(uint32_t ifindex);
|
||||||
|
|
||||||
bool eapol_init();
|
int eapol_init(void);
|
||||||
bool eapol_exit();
|
void eapol_exit(void);
|
||||||
|
@ -482,14 +482,12 @@ int main(int argc, char *argv[])
|
|||||||
dbus_init(dbus);
|
dbus_init(dbus);
|
||||||
|
|
||||||
eap_init(eap_mtu);
|
eap_init(eap_mtu);
|
||||||
eapol_init();
|
|
||||||
|
|
||||||
exit_status = l_main_run_with_signal(signal_handler, NULL);
|
exit_status = l_main_run_with_signal(signal_handler, NULL);
|
||||||
plugin_exit();
|
plugin_exit();
|
||||||
|
|
||||||
iwd_modules_exit();
|
iwd_modules_exit();
|
||||||
|
|
||||||
eapol_exit();
|
|
||||||
eap_exit();
|
eap_exit();
|
||||||
|
|
||||||
if (nl80211) {
|
if (nl80211) {
|
||||||
|
@ -4850,3 +4850,4 @@ void netdev_shutdown(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
IWD_MODULE(netdev, netdev_init, netdev_exit);
|
IWD_MODULE(netdev, netdev_init, netdev_exit);
|
||||||
|
IWD_MODULE_DEPENDS(netdev, eapol);
|
||||||
|
Loading…
Reference in New Issue
Block a user