Skip to content

Commit 12b24be

Browse files
krish2718dleach02
authored andcommitted
modules: hostap: Fix the callback for EAPoL
The signature of callback and the callback function is now changed, so, add a wrapper to convert b/w them. Signed-off-by: Chaitanya Tata <[email protected]>
1 parent ff440ca commit 12b24be

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

modules/hostap/src/supp_main.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,12 @@ struct hostapd_iface *hostapd_get_interface(const char *ifname)
645645
return ctx->hostapd.iface[0];
646646
}
647647

648+
static void hostapd_event_eapol_rx_cb(void *ctx, const u8 *src_addr,
649+
const u8 *buf, size_t len)
650+
{
651+
hostapd_event_eapol_rx(ctx, src_addr, buf, len, FRAME_ENCRYPTION_UNKNOWN, -1);
652+
}
653+
648654
static int hostapd_enable_iface_cb(struct hostapd_iface *hapd_iface)
649655
{
650656
struct hostapd_data *bss;
@@ -662,7 +668,7 @@ static int hostapd_enable_iface_cb(struct hostapd_iface *hapd_iface)
662668

663669
l2_packet_deinit(bss->l2);
664670
bss->l2 = l2_packet_init(bss->conf->iface, bss->conf->bssid, ETH_P_EAPOL,
665-
&hostapd_event_eapol_rx, bss, 0);
671+
&hostapd_event_eapol_rx_cb, bss, 0);
666672
if (bss->l2 == NULL) {
667673
wpa_printf(MSG_ERROR, "Failed to initialize l2 for hostapd interface");
668674
return -1;

0 commit comments

Comments
 (0)