From 0a20bd7d91525b431fff7013974850537f2d8f12 Mon Sep 17 00:00:00 2001 From: Avraham Stern Date: Sun, 28 Jan 2018 14:45:35 +0200 Subject: [PATCH] driver: Add port authorized event Add an event that indicates that the 4 way handshake was completed by the driver. This event is useful for networks that require 802.1X authentication. The driver can use this event that a new connection is already authorized (e.g. when the driver used PMKSA caching) and 802.1X authentication is not required. Signed-off-by: Avraham Stern --- src/drivers/driver.h | 9 +++++++++ src/drivers/driver_common.c | 1 + 2 files changed, 10 insertions(+) diff --git a/src/drivers/driver.h b/src/drivers/driver.h index d9c6fd9f5..38ced14ef 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -4557,6 +4557,15 @@ enum wpa_event_type { * happen. */ EVENT_EXTERNAL_AUTH, + + /** + * EVENT_PORT_AUTHORIZED - Notification that a connection is authorized + * + * This event should be indicated when the driver completes the 4-way + * handshake. This event should be preceded by an EVENT_ASSOC that + * indicates the completion of IEEE 802.11 association. + */ + EVENT_PORT_AUTHORIZED, }; diff --git a/src/drivers/driver_common.c b/src/drivers/driver_common.c index 33a6db346..e4806ad5e 100644 --- a/src/drivers/driver_common.c +++ b/src/drivers/driver_common.c @@ -83,6 +83,7 @@ const char * event_to_string(enum wpa_event_type event) E2S(BEACON_LOSS); E2S(DFS_PRE_CAC_EXPIRED); E2S(EXTERNAL_AUTH); + E2S(PORT_AUTHORIZED); } return "UNKNOWN";