[PATCH] wpa_supplicant: Add the authentication failures count as a DBus attribute

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,


I would like to establish whether the authentication using a supplied PSK for a BSS was successful or not. The success case is easy, since it results in the establishment of the connection (fi.w1.wpa_supplicant1.Interface property state = connected).

The error case is more tricky, since I found no way of getting an authentication failure signal over DBus. This information would be available over the socket interface: in the CTRL-EVENT-SSID-TEMP-DISABLED event, but there seems to be nothing comparable over the DBus interface.

In my observations, the AssocStatusCode, DisconnectReason, and AuthStatusCode attributes are never set to anything other than zero, making them unfit for this.

Therefore, I added a DBus attribute for auth_failures. A change in its state is notified in the wpas_auth_failed() function, ensuring that an authentication failure is always notified by listening to the PropertiesChanged signal and checking that the new AuthFailures attribute is greater than zero.

However, by further reading the code I noticed that wpas_auth_failed() may also be called from wpas_connection_failed() in the context of blacklist management. In that case, the auth_failures  attribute would probably not be an accurate sign of an authentication failure (?).

Is the wpas_auth_failed() function the one and only place where an authentication failure can be accurately diagnosed, or are there any other locations in the code base that should be taken into account?

Would it make sense to change the wpas_connection_failed() as well so that it temp-disables an SSID, but it doesn't use the auth_failures counter for that?

Attached you will find the proposed patch.


Kind regards,
Federico Sauter


Attachment: 0001-wpa_supplicant-Add-auth_failures-count-as-a-DBus-att.patch
Description: 0001-wpa_supplicant-Add-auth_failures-count-as-a-DBus-att.patch

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap

[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux