aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/dbus/dbus_new_handlers.c
diff options
context:
space:
mode:
authorAlex Khouderchah <akhouderchah@chromium.org>2018-07-05 23:29:09 (GMT)
committerJouni Malinen <j@w1.fi>2019-01-02 22:39:12 (GMT)
commit38b405c8f055fafd3117bee32c108de86f835f94 (patch)
treeac5d19e6b051e911bb1dc309a0c9960e39ad60c3 /wpa_supplicant/dbus/dbus_new_handlers.c
parent80d06d0ca9f3b2986e89c8169087b7a71487bf95 (diff)
downloadhostap-38b405c8f055fafd3117bee32c108de86f835f94.zip
hostap-38b405c8f055fafd3117bee32c108de86f835f94.tar.gz
hostap-38b405c8f055fafd3117bee32c108de86f835f94.tar.bz2
dbus: Expose authentication status to D-Bus
wpa_supplicant currently logs CTRL-EVENT-AUTH-FAILED errors when authentication fails, but doesn't expose any property to the D-Bus interface related to this. This change adds the "AuthStatusCode" property to the interface, which contains the IEEE 802.11 status code of the last authentication. Signed-off-by: Alex Khouderchah <akhouderchah@chromium.org>
Diffstat (limited to 'wpa_supplicant/dbus/dbus_new_handlers.c')
-rw-r--r--wpa_supplicant/dbus/dbus_new_handlers.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/wpa_supplicant/dbus/dbus_new_handlers.c b/wpa_supplicant/dbus/dbus_new_handlers.c
index 60557db..0d2ddd9 100644
--- a/wpa_supplicant/dbus/dbus_new_handlers.c
+++ b/wpa_supplicant/dbus/dbus_new_handlers.c
@@ -3093,6 +3093,27 @@ dbus_bool_t wpas_dbus_getter_disconnect_reason(
/**
+ * wpas_dbus_getter_auth_status_code - Get most recent auth status code
+ * @iter: Pointer to incoming dbus message iter
+ * @error: Location to store error on failure
+ * @user_data: Function specific data
+ * Returns: TRUE on success, FALSE on failure
+ *
+ * Getter for "AuthStatusCode" property.
+ */
+dbus_bool_t wpas_dbus_getter_auth_status_code(
+ const struct wpa_dbus_property_desc *property_desc,
+ DBusMessageIter *iter, DBusError *error, void *user_data)
+{
+ struct wpa_supplicant *wpa_s = user_data;
+ dbus_int32_t reason = wpa_s->auth_status_code;
+
+ return wpas_dbus_simple_property_getter(iter, DBUS_TYPE_INT32,
+ &reason, error);
+}
+
+
+/**
* wpas_dbus_getter_assoc_status_code - Get most recent failed assoc status code
* @iter: Pointer to incoming dbus message iter
* @error: Location to store error on failure