aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/notify.c
Commit message (Collapse)AuthorAgeFilesLines
* Propagate the EAP method error codeAhmed ElArabawy2018-03-311-0/+6
| | | | | | | | | | | | | | | | | | In the current implementation, upon an EAP method failure, followed by an EAP failure, the EAP Status is propagated up in wpa_supplicant with a general failure parameter string "failure". This parameter is used for a notification on the dbus. This commit reports the EAP method failure error code in a separate callback. The solution in this commit is generic to all EAP methods, and can be used by any method that need to pass its error code. However, this commit only implements the reporting for EAP-SIM and EAP-AKA methods where the Notification Code (in AT_NOTIFICATION) is used as the method specific error code value. Signed-off-by: Ahmed ElArabawy <arabawy@google.com>
* dbus: Add MeshPeerDisconnected signalSaurav Babu2017-09-091-0/+10
| | | | | | This is similar to the control interface event MESH-PEER-DISCONNECTED. Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
* dbus: Add MeshPeerConnected signalSaurav Babu2017-09-091-0/+10
| | | | | | This is similar to the control interface event MESH-PEER-CONNECTED. Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
* dbus: Add MeshGroupRemoved signalSaurav Babu2017-09-091-0/+14
| | | | | | This is similar to the control interface event MESH-GROUP-REMOVED. Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
* dbus: Add MeshGroupStarted signalSaurav Babu2017-09-091-0/+12
| | | | | | | This introduces a new interface for mesh and adds a signal that is similar to the control interface event MESH-GROUP-STARTED. Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
* D-Bus: Send P2P IP address assignment info with GroupStarted eventNishant Chaprana2016-11-211-2/+2
| | | | | | | This commit adds IP address information into GroupStarted event on the P2P client side like it is sent over the control interface. Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
* D-Bus: Remove unused wpas_dbus_signal_p2p_group_started() parameterJouni Malinen2016-05-301-1/+1
| | | | | | The ssid pointer was not used. Signed-off-by: Jouni Malinen <j@w1.fi>
* D-Bus: Indicate whether created group is persistent or notNishant Chaprana2016-05-301-2/+2
| | | | | | | | | This adds an extra parameter in GroupStarted signal to indicate whether the created group is Persistent or not. It is similar to the [PERSISTENT] tag which comes in P2P-GROUP-STARTED over the control interface. Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
* binder: Add binder skeletal code for AndroidRoshan Pius2016-04-021-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | Create the skeletal binder interface for wpa_supplicant. The interface hierarchy is based off the existing dbus interface(https://w1.fi/wpa_supplicant/devel/dbus.html). Since we use libbinder, the binder interface codebase needs to be written in C++ and can only be compiled on Android platform for now. The aidl files define binder RPC interfaces. The Android build system generates the corresponding C++ interface classes which needs to be implemented by the server process. The clients can obtain a reference to the binder service (root object) using: android::String16 service_name("fi.w1.wpa_supplicant"); android::sp<android::IBinder> binder = android::defaultServiceManager()->getService(service_name); Once a reference to the root object is retrieved, the clients can obtain references to other RPC objects using that root object methods. Signed-off-by: Roshan Pius <rpius@google.com>
* D-Bus: Add association response status code property for failure casesNaveen Singh2016-03-061-0/+9
| | | | | | | | | | (Re)Association Response frame with status code other than 0 is now notified over DBUS as a part of PropertiesChanged signal. This can be used by application in case AP is denying association with status code 17 (band steering) so that it does not interfere in the BSSID selection logic of wpa_supplicant. Signed-off-by: Naveen Singh <nasingh@google.com>
* D-Bus: Add InvitationReceived SignalManeesh Jain2015-09-271-0/+10
| | | | | | | | This is equivalent to the P2P_EVENT_INVITATION_RECEIVED signal on the control interface. It can be used to sent the Invitation Received signal to applications written using D-Bus. Signed-off-by: Maneesh Jain <maneesh.jain@samsung.com>
* P2P: Add D-Bus signal GroupFormationFailureNishant Chaprana2015-09-051-0/+8
| | | | | | | This is similar to the control interface event P2P-GROUP-FORMATION-FAILURE. Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
* FST: Integration into wpa_supplicantAnton Nayshtut2015-07-161-0/+11
| | | | | | This commit integrates the FST into the wpa_supplicant. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Fix persistent group profile on manual disabled=2 changeJouni Malinen2015-06-101-0/+2
| | | | | | | | | | | ssid->p2p_persistent_group was left to its old value when changing a network profile to/from P2P persistent group type (disabled=2). This could result in unexpected behavior when using an incomplete persistent group profile. This was mainly visible through D-Bus network profile handling where a persistent group would not be unregistered insome cases. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* D-Bus: Add WPS pbc-overlap EventAvichal Agarwal2015-06-101-0/+10
| | | | | | | This sends an Event D-Bus signal with name "pbc-overlap" for WPS-EVENT-OVERLAP. Signed-off-by: Avichal Agarwal <avichal.a@samsung.com>
* P2P: Add GO Intent of connecting device in GO Negotiation Request eventMAYANK HAARIT2015-06-061-2/+2
| | | | | | | | | Add GO Intent information of connecting device in GO Negotiation Request event which will help applications to decide its own GO intent value in advance and can avoid failure cases when both devices use GO Intent 15 depending on application requirement. Signed-off-by: Mayank Haarit <mayank.h@samsung.com>
* P2P: Add D-Bus FindStopped to notify P2P-FIND-STOPPED eventNishant Chaprana2015-05-251-0/+7
| | | | | | | Add D-Bus notification mechanism of P2P-FIND-STOPPED event on fi.w1.wpa_supplicant1.Interface.P2PDevice interface. Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
* Fix wpas_notify_network_removed()Jouni Malinen2015-04-291-4/+2
| | | | | | | | | Commit bb3df9a569e4a33445c89ebc50019ba46b4f6704 ('notify: Do not raise any signal from a P2P management interface') was supposed to only change D-Bus behavior, but it ended up disabling non-D-Bus functionality as well for some sequences where the P2P Device interface is used. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* D-Bus: Fix network block type changeJouni Malinen2015-02-071-0/+19
| | | | | | | | | | | It is possible for a network profile to change its type from P2P persistent group to a normal network and back. The D-Bus interface uses different types of objects for those, so the object needs to re-registered in case of type change. This fixes issues in leaving behind an incorrect type of object and leaking memory when freeing such a network block that has had its disabled parameter changed. Signed-off-by: Jouni Malinen <j@w1.fi>
* Add peer certificate alt subject name information to EAP eventsJouni Malinen2015-01-141-4/+13
| | | | | | | | | | | | | | | A new "CTRL-EVENT-EAP-PEER-ALT depth=<i> <alt name>" event is now used to provide information about server certificate chain alternative subject names for upper layers, e.g., to make it easier to configure constraints on the server certificate. For example: CTRL-EVENT-EAP-PEER-ALT depth=0 DNS:server.example.com Currently, this includes DNS, EMAIL, and URI components from the certificates. Similar information is priovided to D-Bus Certification signal in the new altsubject argument which is a string array of these items. Signed-off-by: Jouni Malinen <j@w1.fi>
* D-Bus: Fix P2P persistent group removal from non-D-Bus triggersJouni Malinen2014-12-291-0/+3
| | | | | | | | | | It is possible for the persistent group object to be added and removed by non-D-Bus triggers (e.g., ctrl_iface commands). The add part was already handled, but removal was not. That resulted in memory leaks when a P2P persistent group was removed without using an explicit D-Bus command for this even if the object was added without D-Bus involvement. Signed-off-by: Jouni Malinen <j@w1.fi>
* D-Bus: Fix P2P peer joined/disconnected handlersJouni Malinen2014-12-291-2/+4
| | | | | | | | | It is possible for the peer to be a non-P2P device and as such, for p2p_dev_addr to be NULL. This resulted in NULL pointer dereference if D-Bus interface was enabled for the interface when a legacy STA joined a group. Signed-off-by: Jouni Malinen <j@w1.fi>
* notify: Do not raise any signal from a P2P management interfaceTomasz Bursztyka2014-10-271-0/+102
| | | | | | | Such interface is not registered on DBus, thus there is no need to raise any signal from it. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
* Add support for driver command to update roaming policyJouni Malinen2014-09-111-0/+15
| | | | | | | | | | | | | The network block bssid parameter can be used to force a specific BSS to be used for a connection. It is also possible to modify this parameter during an association. Previously, that did not result in any notification to the driver which was somewhat problematic with drivers that take care of BSS selection. Add a new mechanism to allow wpa_supplicant to provide a driver update if the bssid parameter change for the current connection modifies roaming policy (roaming allowed/disallowed within ESS). Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* dbus: add BSS Age property to indicate last-seen timeDan Williams2014-09-071-0/+6
| | | | | | | | | | | | | | "Age" is the age in seconds since the BSS was last seen, and is emitted as a PropertyChanged signal whenever the BSS is updated from a scan result. It also returns the correct age when queried directly. This property can be used to resolve issues where, if no other properties of the BSS changed from scan results (for example, if the BSS always had 100% signal) no D-Bus signals would be emitted to indicate that the BSS had just been seen in the scan. Signed-hostap: Dan Williams <dcbw@redhat.com>
* dbus: Declare and implement GroupFinished as for GroupStartedTomasz Bursztyka2014-07-311-2/+2
| | | | | | | | First for better concistancy but also to tell about the group_object that is getting removed, thus the client will know about it and will be able to act accordingly. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
* dbus: Remove GroupMember object type and use Peer insteadTomasz Bursztyka2014-06-291-17/+5
| | | | | | | GroupMember is unusable in itself and all the necessary informations are stored in Peer objects, thus replace the use of GroupMember by Peer. Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
* P2P: Clean up by moving ifdef CONFIG_P2P to p2p_suppplicant.hJouni Malinen2014-06-151-4/+0
| | | | | | | | This removes number of unnecessary #ifdef CONFIG_P2P blocks from generic code by hiding the conditional build into p2p_supplicant.h with empty inline functions. Signed-off-by: Jouni Malinen <j@w1.fi>
* Interworking: Prefer last added network during network selectionJouni Malinen2014-02-251-0/+2
| | | | | | | | | | | | | Previously, any network block could be used to select the BSS to connect to when processing scan results after Interworking network selection. This can result in somewhat unexpected network selection in cases where credential preferences indicated that a specific network was selected, but another network ended up getting used for the connection. While the older networks continue to be valid, add special processing for this initial post-interworking-connect case to get more consistent network selection to match with the Interworking network selection result. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Android: Add SSID in supplicant change eventDmitry Shmidt2013-11-171-2/+6
| | | | | | | In addition, change wpa_s->pending_bssid to wpa_s->bssid for the BSSID value in the event. Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
* D-Bus: Do not send network notification for all P2P groupsJouni Malinen2013-08-311-2/+2
| | | | | | | | | Previously, network added event was skipping during group formation. However, this did not necessarily catch all cases of temporary P2P network blocks. Check ssid->p2p_group to make this behavior more consistent by avoiding all P2P groups. Signed-hostap: Jouni Malinen <j@w1.fi>
* D-Bus: Emit signal when a station is authorized or deauthorizedChengyi Zhao2013-06-221-0/+6
| | | | | | | | | | Add "StaAuthorized" and "StaDeauthorized" D-Bus interface in AP mode. After enabling the AP mode of wpa_supplicant, the other process need to get the MAC address and authorization status of every station, so wpa_supplicant emits signal when the station is authorized or deauthorized. Signed-hostap: Chengyi Zhao <chengyix.zhao@gmail.com>
* Provide TLS alerts to CLI/UI over control interfaceChris Hessing2013-04-231-0/+3
| | | | | | | Harmonize EAP status events over control interface to provide same functionality as existing D-Bus callback. Signed-hostap: Chris Hessing <chris.hessing@cloudpath.net>
* dbus: Add getter for WPS propertiesSven Neumann2012-11-031-0/+3
| | | | | | | Add "WPS" property to the DBus interface that allows to identify the active WPS method of a BSS. Signed-hostap: Sven Neumann <s.neumann@raumfeld.com>
* Export disconnect reason code to dbusGary Morain2012-06-301-0/+6
| | | | | | | | | | | In the properties changed signal, added a new property "DisconnectReason", which carries the IEEE 802.11 reason code of the most recent disassociation or deauthentication event. The reason code is negative if it is locally generated. The property is sent to the DBUS immediately so as to prevent it from being coalesced with other disconnect events. Signed-off-by: Gary Morain <gmorain@chromium.org>
* wpa_supplicant: Report EAP connection progress to DBusPaul Stewart2012-06-041-0/+7
| | | | | | | | | | | | | | | | | | | | | Send an "EAP" signal via the new DBus interface under various conditions during EAP authentication: - During method selection (ACK and NAK) - During certificate verification - While sending and receiving TLS alert messages - EAP success and failure messages This provides DBus callers a number of new tools: - The ability to probe an AP for available EAP methods (given an identity). - The ability to identify why the remote certificate was not verified. - The ability to identify why the remote peer refused a TLS connection. Signed-hostap: Paul Stewart <pstew@chromium.org>
* P2P: Notify about disconnection only when neededEliad Peller2012-04-011-1/+1
| | | | | | | | | | wpas_notify_state_changed() notified about disconnection when new_state < WPA_ASSOCIATED, without checking the old state. This results in extra processing which can be avoided by checking that old_state was connected. Signed-hostap: Eliad Peller <eliad@wizery.com> intended-for: hostap-1
* DBus: Add ability to report probe requestsJohannes Berg2012-04-011-0/+10
| | | | | | | | | | | | | | | | Some applications require knowing about probe requests to identify devices. This can be the case in AP mode to see the devices before they connect, or even in P2P mode when operating as a P2P device to identify non-P2P peers (P2P peers are identified via PeerFound signals). As there are typically a lot of probe requests, require that an interested application subscribes to this signal so the bus isn't always flooded with these notifications. The notifications in DBus are then unicast only to that application. A small test script is also included. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* Remove the GPL notification from files contributed by Jouni MalinenJouni Malinen2012-02-111-8/+2
| | | | | | | Remove the GPL notification text from the files that were initially contributed by myself. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Maintain a list of P2P Clients for persistent group on GOJouni Malinen2011-12-221-3/+7
| | | | | | | | | | Add a new persistent group network block field, p2p_client_list, to maintain a list of P2P Clients that have connected to a persistent group. This allows GO of a persistent group to figure out more easily whether re-invocation of a persistent group can be used with a specific peer device. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Make GO negotiation peer and group information available over D-BusReinette Chatre2011-12-181-2/+3
| | | | | | | | | | | | | | | | | | The GO negotiation response is very cryptic at the moment. For a success message we only know on which interface the negotiation succeeded, not which peer. For a failure we know the interface also and a status code (number). It will be very useful for clients to know upon receipt of such a message which peer the negotiation occurred with. Now that the peer information is available and the API is changed already, the function composing the D-Bus message might as well include all GO negotiation information. This is done with a dict to make things easier on clients if this result information changes down the line. Signed-hostap: Reinette Chatre <reinette.chatre@intel.com> Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* P2P: Clean up group formation on network block removalJouni Malinen2011-12-101-0/+3
| | | | | | | | | | If a P2P group network block is removed for any reason (e.g., wps_cancel command) while the interface is in group formation, remove the group formation timeout and indicate failure immediately. Previously, this type of operations could end up leaving the timeout running and result in somewhat unexpected group formation failure events later. Signed-hostap: Jouni Malinen <j@w1.fi>
* dbus: Implement EAP SM control request signalsDan Williams2011-10-301-0/+9
| | | | | | | | | Add a D-Bus signal for EAP SM requests. This signal is emitted on the Interface object so that clients only have to listen to one object for requests rather than to all network objects. This signal is analogous to the socket control interface's CTRL-REQ- request. Signed-off-by: Dan Williams <dcbw@redhat.com>
* Fix segfault on error path if driver initialization failsJouni Malinen2011-10-201-1/+2
| | | | | wpa_s->wpa is NULL in this case and we better not call WPA state machine functions.
* Flush PMKSA cache entries and invalidate EAP state on network changesJouni Malinen2011-09-071-0/+2
| | | | | | | | | | | If a network configuration block is removed or modified, flush all PMKSA cache entries that were created using that network configuration. Similarly, invalidate EAP state (fast re-auth). The special case for OKC on wpa_supplicant reconfiguration (network_ctx pointer change) is now addressed as part of the PMKSA cache flushing, so it does not need a separate mechanism for clearing the network_ctx values in the PMKSA cache.
* Move peer certificate wpa_msg() calls to notify.cJouni Malinen2011-07-051-0/+21
| | | | | This type of wpa_supplicant specific message construction does not need to be at the EAP implementation, so better move it up to notify.c.
* Add dbus signal for information about server certificationMichael Chang2011-07-051-0/+12
| | | | | | | | | | | | In general, this patch attemps to extend commit 00468b4650998144f794762206c695c962c54734 with dbus support. This can be used by dbus client to implement subject match text entry with preset value probed from server. This preset value, if user accepts it, is remembered and passed to subject_match config for any future authentication. Signed-off-by: Michael Chang <mchang@novell.com>
* Fix D-Bus build without CONFIG_P2P=yJouni Malinen2011-06-271-0/+4
|
* P2P: Add WpsFailed signal in P2P D-BusJayant Sane2011-06-251-0/+8
| | | | | | | Signal is triggered if an error occurs during WPS provisioning phase. Signed-off-by: Jean-Michel.Bachot <jean-michelx.bachot@intel.com> Signed-off-by: Jayant Sane <jayant.sane@intel.com>
* P2P: More complete persistent group management over D-BusJayant Sane2011-06-241-0/+7
| | | | | | Extend commit c2762e410fa319f75a174aeb12343beddf99fce4 to allow applications to manage (add/remove) persistent groups and accepted network object paths while invoking a persistent group.