aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/dbus
diff options
context:
space:
mode:
authorPaul Stewart <pstew@chromium.org>2013-04-23 14:57:55 (GMT)
committerJouni Malinen <j@w1.fi>2013-04-23 14:57:55 (GMT)
commit754632c965a4c2a65d9d289745245a572351081d (patch)
tree77756cd19779ff97e3a372029cf2b3253e37db3c /wpa_supplicant/dbus
parentc2aff6b1d1522ea4b0a6ad18acfbe7bce88eab05 (diff)
downloadhostap-754632c965a4c2a65d9d289745245a572351081d.zip
hostap-754632c965a4c2a65d9d289745245a572351081d.tar.gz
hostap-754632c965a4c2a65d9d289745245a572351081d.tar.bz2
dbus_new: Add EAP logon/logoff
Add "EAPLogoff" and "EAPLogon" interface DBus commands which parallel the "logoff" and "logon" wpa_ctrl commands which terminate and restart EAP authentication. Slightly enhance the "logon" case by expiring any running "startWhile" timer. Signed-hostap: Paul Stewart <pstew@chromium.org>
Diffstat (limited to 'wpa_supplicant/dbus')
-rw-r--r--wpa_supplicant/dbus/dbus_new.c12
-rw-r--r--wpa_supplicant/dbus/dbus_new_handlers.c32
-rw-r--r--wpa_supplicant/dbus/dbus_new_handlers.h6
3 files changed, 50 insertions, 0 deletions
diff --git a/wpa_supplicant/dbus/dbus_new.c b/wpa_supplicant/dbus/dbus_new.c
index 136dd1a..e9bd51f 100644
--- a/wpa_supplicant/dbus/dbus_new.c
+++ b/wpa_supplicant/dbus/dbus_new.c
@@ -2654,6 +2654,18 @@ static const struct wpa_dbus_method_desc wpas_dbus_interface_methods[] = {
}
},
#endif /* CONFIG_AP */
+ { "EAPLogoff", WPAS_DBUS_NEW_IFACE_INTERFACE,
+ (WPADBusMethodHandler) &wpas_dbus_handler_eap_logoff,
+ {
+ END_ARGS
+ }
+ },
+ { "EAPLogon", WPAS_DBUS_NEW_IFACE_INTERFACE,
+ (WPADBusMethodHandler) &wpas_dbus_handler_eap_logon,
+ {
+ END_ARGS
+ }
+ },
{ NULL, NULL, NULL, { END_ARGS } }
};
diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c
index 335c25f..478d02f 100644
--- a/wpa_supplicant/dbus/dbus_new_handlers.c
+++ b/wpa_supplicant/dbus/dbus_new_handlers.c
@@ -1938,6 +1938,38 @@ DBusMessage * wpas_dbus_handler_autoscan(DBusMessage *message,
#endif /* CONFIG_AUTOSCAN */
+/*
+ * wpas_dbus_handler_eap_logoff - IEEE 802.1X EAPOL state machine logoff
+ * @message: Pointer to incoming dbus message
+ * @wpa_s: wpa_supplicant structure for a network interface
+ * Returns: NULL
+ *
+ * Handler function for "EAPLogoff" method call of network interface.
+ */
+DBusMessage * wpas_dbus_handler_eap_logoff(DBusMessage *message,
+ struct wpa_supplicant *wpa_s)
+{
+ eapol_sm_notify_logoff(wpa_s->eapol, TRUE);
+ return NULL;
+}
+
+
+/*
+ * wpas_dbus_handler_eap_logon - IEEE 802.1X EAPOL state machine logon
+ * @message: Pointer to incoming dbus message
+ * @wpa_s: wpa_supplicant structure for a network interface
+ * Returns: NULL
+ *
+ * Handler function for "EAPLogin" method call of network interface.
+ */
+DBusMessage * wpas_dbus_handler_eap_logon(DBusMessage *message,
+ struct wpa_supplicant *wpa_s)
+{
+ eapol_sm_notify_logoff(wpa_s->eapol, FALSE);
+ return NULL;
+}
+
+
/**
* wpas_dbus_getter_capabilities - Return interface capabilities
* @iter: Pointer to incoming dbus message iter
diff --git a/wpa_supplicant/dbus/dbus_new_handlers.h b/wpa_supplicant/dbus/dbus_new_handlers.h
index aa56550..fbc8358 100644
--- a/wpa_supplicant/dbus/dbus_new_handlers.h
+++ b/wpa_supplicant/dbus/dbus_new_handlers.h
@@ -128,6 +128,12 @@ DBusMessage * wpas_dbus_handler_flush_bss(DBusMessage *message,
DBusMessage * wpas_dbus_handler_autoscan(DBusMessage *message,
struct wpa_supplicant *wpa_s);
+DBusMessage * wpas_dbus_handler_eap_logoff(DBusMessage *message,
+ struct wpa_supplicant *wpa_s);
+
+DBusMessage * wpas_dbus_handler_eap_logon(DBusMessage *message,
+ struct wpa_supplicant *wpa_s);
+
dbus_bool_t wpas_dbus_getter_capabilities(DBusMessageIter *iter,
DBusError *error, void *user_data);