mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-02-16 23:40:43 +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/dbus.h"
|
||||||
#include "src/scan.h"
|
#include "src/scan.h"
|
||||||
#include "src/util.h"
|
#include "src/util.h"
|
||||||
|
#include "src/eapol.h"
|
||||||
|
|
||||||
static struct l_genl *genl = NULL;
|
static struct l_genl *genl = NULL;
|
||||||
static struct l_genl_family *nl80211 = NULL;
|
static struct l_genl_family *nl80211 = NULL;
|
||||||
@ -72,6 +73,7 @@ struct netdev {
|
|||||||
struct l_hashmap *networks;
|
struct l_hashmap *networks;
|
||||||
struct bss *connected_bss;
|
struct bss *connected_bss;
|
||||||
struct l_dbus_message *connect_pending;
|
struct l_dbus_message *connect_pending;
|
||||||
|
struct l_io *eapol_io;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct wiphy {
|
struct wiphy {
|
||||||
@ -612,6 +614,7 @@ static void netdev_free(void *data)
|
|||||||
|
|
||||||
l_queue_destroy(netdev->bss_list, bss_free);
|
l_queue_destroy(netdev->bss_list, bss_free);
|
||||||
l_queue_destroy(netdev->old_bss_list, bss_free);
|
l_queue_destroy(netdev->old_bss_list, bss_free);
|
||||||
|
l_io_destroy(netdev->eapol_io);
|
||||||
|
|
||||||
l_free(netdev);
|
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);
|
setup_scheduled_scan(wiphy, netdev, scheduled_scan_interval);
|
||||||
|
|
||||||
l_debug("Found interface %s", netdev->name);
|
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,
|
static void parse_supported_commands(struct wiphy *wiphy,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user