aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wpas_glue.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2009-04-22 13:01:37 (GMT)
committerJouni Malinen <j@w1.fi>2009-04-22 13:01:37 (GMT)
commit4bc181ecc7e918759a032c4c37ac4e7f6f47e147 (patch)
tree46996dc7b99b5e390d18aefc519a0c4bf99e94b3 /wpa_supplicant/wpas_glue.c
parentf55802e8bfe8725efa238f1393a8d234f4e51d03 (diff)
downloadhostap-4bc181ecc7e918759a032c4c37ac4e7f6f47e147.zip
hostap-4bc181ecc7e918759a032c4c37ac4e7f6f47e147.tar.gz
hostap-4bc181ecc7e918759a032c4c37ac4e7f6f47e147.tar.bz2
Add new wpa_supplicant driver op for setting 802.1X port status
This can be used with drivers that implement PAE to control whether normal data frames (non-EAPOL) are allowed.
Diffstat (limited to 'wpa_supplicant/wpas_glue.c')
-rw-r--r--wpa_supplicant/wpas_glue.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/wpa_supplicant/wpas_glue.c b/wpa_supplicant/wpas_glue.c
index d8af14d..c2eb131 100644
--- a/wpa_supplicant/wpas_glue.c
+++ b/wpa_supplicant/wpas_glue.c
@@ -537,6 +537,15 @@ static void wpa_supplicant_eap_param_needed(void *ctx, const char *field,
#endif /* CONFIG_CTRL_IFACE || !CONFIG_NO_STDOUT_DEBUG */
+static void wpa_supplicant_port_cb(void *ctx, int authorized)
+{
+ struct wpa_supplicant *wpa_s = ctx;
+ wpa_printf(MSG_DEBUG, "EAPOL: Supplicant port status: %s",
+ authorized ? "Authorized" : "Unauthorized");
+ wpa_drv_set_supp_port(wpa_s, authorized);
+}
+
+
int wpa_supplicant_init_eapol(struct wpa_supplicant *wpa_s)
{
#ifdef IEEE8021X_EAPOL
@@ -564,6 +573,7 @@ int wpa_supplicant_init_eapol(struct wpa_supplicant *wpa_s)
#endif /* EAP_TLS_OPENSSL */
ctx->wps = wpa_s->wps;
ctx->eap_param_needed = wpa_supplicant_eap_param_needed;
+ ctx->port_cb = wpa_supplicant_port_cb;
ctx->cb = wpa_supplicant_eapol_cb;
ctx->cb_ctx = wpa_s;
wpa_s->eapol = eapol_sm_init(ctx);