mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 23:09:34 +01:00
wiphy: Open PAE socket when an interface is found
Open a PAE socket to retrieve eapol frames for 4-way handshake.
This commit is contained in:
parent
db45cd8dbf
commit
67cdc80753
@ -39,6 +39,7 @@
|
||||
#include "src/dbus.h"
|
||||
#include "src/scan.h"
|
||||
#include "src/util.h"
|
||||
#include "src/eapol.h"
|
||||
|
||||
static struct l_genl *genl = NULL;
|
||||
static struct l_genl_family *nl80211 = NULL;
|
||||
@ -72,6 +73,7 @@ struct netdev {
|
||||
struct l_hashmap *networks;
|
||||
struct bss *connected_bss;
|
||||
struct l_dbus_message *connect_pending;
|
||||
struct l_io *eapol_io;
|
||||
};
|
||||
|
||||
struct wiphy {
|
||||
@ -612,6 +614,7 @@ static void netdev_free(void *data)
|
||||
|
||||
l_queue_destroy(netdev->bss_list, bss_free);
|
||||
l_queue_destroy(netdev->old_bss_list, bss_free);
|
||||
l_io_destroy(netdev->eapol_io);
|
||||
|
||||
l_free(netdev);
|
||||
}
|
||||
@ -1246,6 +1249,12 @@ static void interface_dump_callback(struct l_genl_msg *msg, void *user_data)
|
||||
setup_scheduled_scan(wiphy, netdev, scheduled_scan_interval);
|
||||
|
||||
l_debug("Found interface %s", netdev->name);
|
||||
|
||||
netdev->eapol_io = eapol_open_pae(netdev->index);
|
||||
if (!netdev->eapol_io)
|
||||
l_error("Failed to open PAE socket");
|
||||
|
||||
/* TODO: set read handler and read eapol frames */
|
||||
}
|
||||
|
||||
static void parse_supported_commands(struct wiphy *wiphy,
|
||||
|
Loading…
Reference in New Issue
Block a user