path: root/wpa_supplicant/dbus
Commit message (Collapse)AuthorAgeFilesLines
* D-Bus: Add ConfigFile parameter into the interface propertiesJose Blanquicet2016-08-293-0/+30
| | | | | | | | | This patch aims to expose the configuration file path as an interface property, like is done with the driver and the bridge name. Doing so, higher layer programs become responsible to recreate interfaces with the correct configuration file path when programs need to remove them. Signed-off-by: Jose Blanquicet <blanquicet@gmail.com>
* Move network add/remove operations to a common functionRoshan Pius2016-08-182-39/+10
| | | | | | | | | All the 3 control interfaces: socket based, dbus & binder needs to perform the same sequence of steps for network add/remove. So, move these to a common utility method in |wpa_supplicant.c| instead of duplicating the code everywhere. Signed-off-by: Roshan Pius <rpius@google.com>
* Move disconnect command handling to a common placeRoshan Pius2016-08-132-6/+2
| | | | | | | | Move out the disconnect command handling from |ctrl_iface.c| to |wpa_supplicant.c| so that it can be reused across the different control interfaces (socket, dbus & binder). Signed-off-by: Roshan Pius <rpius@google.com>
* D-Bus: Make the CurrentAuthMode property getter more robustJouni Malinen2016-06-241-1/+3
| | | | | | | | Now that mesh sets wpa_s->wpa_state = WPA_COMPLETED, it looks like this getter can get called with wpa_s->current_ssid = NULL. That could result in NULL pointer dereference, so need to protect that specific case. Signed-off-by: Jouni Malinen <j@w1.fi>
* D-Bus: Add DeviceFoundProperties signal for discovered peersNishant Chaprana2016-06-241-5/+20
| | | | | | | | | | | | | | | | | | | | | This signal sends the peer properties to applications for discovered peers. The signature of this event is "oa{sv}". This event is needed because the current DeviceFound signal provides only the peer object path. If there are many peers in range there will be many DeviceFound signals and for each DeviceFound signal, applications would need to use GetAll to fetch peer properties. Doing this many times would create extra load over application as well as over wpa_supplicant, so it is better to send peer properties in the event so that applications can extract found peer information without extra steps. The existing DeviceFound signal is left as-is to avoid changing its signature. The issue is not applicable to the control interface because the P2P-DEVICE-FOUND event includes peer info in it, but over D-Bus interface DeviceFound provides only the peer object. Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
* D-Bus: Remove unused wpas_dbus_signal_p2p_group_started() parameterJouni Malinen2016-05-302-4/+0
| | | | | | 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-302-5/+5
| | | | | | | | | 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>
* D-Bus: Check driver capability for IBSS in Modes property of CapabilitiesSaurav Babu2016-05-131-2/+3
| | | | | | | Instead of hardcoding "ad-hoc" in the array of supported capabilities, add this only if the driver indicates support for IBSS. Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
* D-Bus: Add association response status code property for failure casesNaveen Singh2016-03-064-0/+32
| | | | | | | | | | (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>
* P2P: Add a separate pointer to the P2P Device instanceLior David2016-02-271-2/+2
| | | | | | | | | | | | | | | In many places in the code there was a reference to wpa_s->parent to get from group interface to p2p_dev interface. These places can break if P2P_DEVICE interface would need to be used with the primary interface as the group interface, since the parent of the primary interface points to itself and not the p2p_dev interface. Fix this by adding a separate "p2pdev" pointer to wpa_supplicant, it will be the same as parent pointer in most cases but whenever the primary interface is used as a group interface, change it to point to the correct p2p_dev interface. Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
* D-Bus: Don't do <deny send_interface="..." /> in dbus service fileLubomir Rintel2016-02-071-2/+0
| | | | | | | | | | | | | | | | | | | | | | | It does more than intended; apart from denying messages to that particular interface it also denies all messages non-qualified with an interface globally. This blocks messages completely unrelated to wpa_supplicant, such as NetworkManager communication with the VPN plugins. From the dbus-daemon manual: Be careful with send_interface/receive_interface, because the interface field in messages is optional. In particular, do NOT specify <deny send_interface="org.foo.Bar"/>! This will cause no-interface messages to be blocked for all services, which is almost certainly not what you intended. Always use rules of the form: <deny send_interface="org.foo.Bar" send_destination="org.foo.Service"/> We can just safely remove those rules, since we're sufficiently protected by the send_destination matches and method calls are disallowed by default anyway. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
* D-Bus: Fix p2p interface capability messageJohn Ernberg2016-02-051-0/+1
| | | | | | | | If the config file for the interface says "p2p_disabled=1", don't report p2p capabilities on this interface. This helps programs like Connman to not enable p2p when it's been disabled in wpa_supplicant. Signed-off-by: John Ernberg <john.ernberg@actia.se>
* dbus: Restrict DeviceName size to 32 characters in setterPurushottam Kushwaha2016-01-151-1/+2
| | | | | | | The maximum WPS Device Name length is 32 characters and that limit was already enforced for the control interface and configuration files. Signed-off-by: Purushottam Kushwaha <p.kushwaha@samsung.com>
* P2P: Provide group SSID, if specified, to P2P Client join stepJouni Malinen2015-12-301-1/+1
| | | | | | | | | At least one of the wpas_p2p_connect() callers (NFC join case) already had access to the Group SSID. Pass that information through wpas_p2p_connect() to wpas_p2p_join() so that the join operation can filter out incorrect groups more easily. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* dbus: Add support for vendor specific elementsAvichal Agarwal2015-12-063-0/+175
| | | | | | | | | | | | | | | | | | The new methods are 1. VendorElemAdd "i" "ay" i=integer ay=array of bytes 2. VendorElemGet "i" i=integer (output array of bytes) 3. VendorElemRem "i" "ay" i=integer ay=array of bytes These provide functionality similar to the control interface commands VENDOR_ELEM_ADD, VENDOR_ELEM_GET, and VENDOR_ELEM_REMOVE. Signed-off-by: Avichal Agarwal <avichal.a@samsung.com> Signed-off-by: Purushottam Kushwaha <p.kushwaha@samsung.com> Signed-off-by: Kyeong-Chae Lim <kcya.lim@samsung.com> Signed-off-by: Mayank Haarit <mayank.h@samsung.com> Signed-off-by: Dilshad Ahmad <dilshad.a@samsung.com> [VendorElemGet to return array of bytes instead of string; cleanup] Signed-off-by: Jouni Malinen <j@w1.fi>
* P2P: Add support for VHT 80+80 MHz and 160 MHzAhmad Kholaif2015-11-251-5/+6
| | | | | | | | | The new max_oper_chwidth and freq2 arguments to P2P_CONNECT, P2P_INVITE, and P2P_GROUP_ADD control interface commands can be used to request larger VHT operating channel bandwidth to be used than the previously used maximum 80 MHz. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* dbus: Fix memory leak in sending InvitationReceived signalMAYANK HAARIT2015-11-171-0/+1
| | | | | | | | Free the message after message send in wpas_dbus_signal_p2p_invitation_received() to avoid leaking memory. Signed-off-by: Mayank Haarit <mayank.h@samsung.com> Signed-off-by: Avichal Agarwal <avichal.a@samsung.com>
* dbus: Do not use pointer arithmetic with a void pointerSamuel Tan2015-11-151-1/+2
| | | | | | | This failed to compile on x86 gcc due to pointer arithmetic on a void pointer. Signed-off-by: Samuel Tan <samueltan@google.com>
* dbus: Add SaveConfig to update configuration filePurushottam Kushwaha2015-11-153-0/+40
| | | | | | | | This is similar to SAVE_CONFIG on control interface, which allow users to update the configuration file. Signed-off-by: Purushottam Kushwaha <p.kushwaha@samsung.com> Signed-off-by: Mayank Haarit <mayank.h@samsung.com>
* dbus: Fix a copy-paste error in debug printPurushottam Kushwaha2015-11-151-1/+1
| | | | Signed-off-by: Mayank Haarit <mayank.h@samsung.com>
* dbus: Remove unused dict helper functionsJouni Malinen2015-10-312-89/+0
| | | | | | There are no callers for these helper functions. Signed-off-by: Jouni Malinen <j@w1.fi>
* dbus: Expose interface globals via D-Bus propertiesDan Williams2015-10-286-41/+319
| | | | | | | All interface globals are now exposed as D-Bus properties of type string, and parsed via the normal interface global parsing functions. Signed-off-by: Dan Williams <dcbw@redhat.com>
* dbus: Pass property description to getters/settersDan Williams2015-10-287-561/+377
| | | | | | We'll use it later for global interface properties. Signed-off-by: Dan Williams <dcbw@redhat.com>
* D-Bus: Add a dbus handler for expected disconnectionNingyuan Wang2015-10-123-0/+30
| | | | | | | | | | | Add a global D-Bus handler ExpectDisconnect for setting wpa_s->own_disconnect_req flag. This flag will prevent wpa_supplicant from adding blacklists and requesting incomplete scan upon the incoming disconnection. This is mainly meant for a case where suspend/resume is used and some external component knows about that and can provide the information to wpa_supplicant before the disconnection happens. Signed-off-by: Ningyuan Wang <nywang@google.com>
* D-Bus: Add InvitationReceived SignalManeesh Jain2015-09-273-1/+76
| | | | | | | | 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>
* D-Bus: Add signal to notify WPS timeout eventSaurav Babu2015-09-271-0/+4
| | | | Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
* D-BUS: dev_passwd_id should be "q" because it uses DBUS_TYPE_UINT16Nishant Chaprana2015-09-251-1/+1
| | | | | | | | This corrects the type of dev_passwd_id in GONegotiationRequest event. This field is packed as DBUS_TYPE_UINT16 but in wpas_dbus_interface_signals it was "i" which is DBUS_TYPE_INT32. Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
* P2P: Add D-Bus signal GroupFormationFailureNishant Chaprana2015-09-052-0/+49
| | | | | | | This is similar to the control interface event P2P-GROUP-FORMATION-FAILURE. Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
* dbus: Fix a typo in function commentMAYANK HAARIT2015-08-271-1/+1
| | | | | Signed-off-by: Mayank Haarit <mayank.h@samsung.com> Signed-off-by: Dilshad Ahmad <dilshad.a@samsung.com>
* dbus: Do not quote scan_freq and freq_list in dbus_old_handlers.cJiří Klimeš2015-08-271-1/+1
| | | | | | | | | | | | scan_freq and freq_list are not parsed correctly by wpa_config_parse_int_array() if quoted. Patch for dbus_old_handlers.c, the same change as done by Robert Shade <robert.shade@gmail.com> for dbus_new_handlers.c in commit 99276998fa26d4299825eeafb6386fe1c51f6287 ('dbus: Do not quote scan_freq and freq_list'). Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
* P2P: Require fresh scan results for persistent group re-invocationJouni Malinen2015-08-211-1/+1
| | | | | | | | | | | | | | | | | | The P2P group is not yet operating when going through invitation exchange for re-invocation. Previously, an old cached scan result could be used to skip the scan immediately after the invitation exchange. While this may result in the fastest possible connection, it does have some issues with cases where the GO takes some time to start up. It would also be at least theoretically possible for some of the BSS parameters to be different, so having a fresh scan result from the new GO instance may be desired in any case. Add a mechanism to skip scan results that have been last updated before a specific point in time and as the first user for this mechanism, require chan results to be more recent than the invitation message exchange for the P2P Client role in persistent group re-invocation case. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* D-Bus: Set last_scan_req to MANUAL_SCAN_REQ on Scan() trigger pathsJouni Malinen2015-08-111-0/+2
| | | | | | | | | | | | | The D-Bus Scan() handler was setting wpa_s->scan_req = MANUAL_SCAN_REQ on the code path that used wpa_supplicant_req_scan(). However, it did not do anything similar for the cases where wpa_supplicant_trigger_scan() is called directly. This could result in unexpected wpa_s->last_scan_req value and incorrect behavior especially when using ap_scan=2 and running a scan while operating in AP mode. Fix this by explicitly setting wpa_s->last_scan_req = MANUAL_SCAN_REQ when using wpa_supplicant_trigger_scan() from the Scan() handler. Signed-off-by: Jouni Malinen <j@w1.fi>
* D-Bus: Fix dont_quote const declarationJouni Malinen2015-07-071-1/+1
| | | | | | | | | Commit 38279bdb35c1b0c248289752197ebddd2fdd52ef ('D-Bus: Coding style cleanup') handled the dbus_new_handlers.c change properly, but misplaced the second 'const' in dbus_old_handlers.c in a way that resulted in duplicated const rather than marking the actual value const. Signed-off-by: Jouni Malinen <j@w1.fi>
* D-Bus: Fix typos in debug printPurushottam Kushwaha2015-06-261-2/+2
| | | | Signed-off-by: Purushottam Kushwaha <p.kushwaha@samsung.com>
* D-Bus: Add documentation for wpas_dbus_signal_peer_groups_changed()Maneesh Jain2015-06-261-0/+7
| | | | | | This is needed to add this function into Doxygen documentation. Signed-off-by: Maneesh Jain <maneesh.jain@samsung.com>
* D-Bus: Fix typo in dbus signal function documentationManeesh Jain2015-06-261-2/+2
| | | | Signed-off-by: Maneesh Jain <maneesh.jain@samsung.com>
* D-Bus: Add function documentation for wpas_dbus_unregister_interface()Maneesh Jain2015-06-261-0/+5
| | | | | | This is needed to add this function into Doxygen documentation. Signed-off-by: Maneesh Jain <maneesh.jain@samsung.com>
* D-Bus: Add function documentation for wpas_dbus_register_interface()Maneesh Jain2015-06-261-0/+5
| | | | | | This is needed to add this function into Doxygen documentation. Signed-off-by: Maneesh Jain <maneesh.jain@samsung.com>
* D-Bus: Fix wpas_dbus_signal_p2p_invitation_result() documentationManeesh Jain2015-06-261-6/+4
| | | | Signed-off-by: Maneesh Jain <maneesh.jain@samsung.com>
* dbus: Do not initialize variable twiceJouni Malinen2015-06-231-1/+1
| | | | | | | There is no point in initializing 'success' to FALSE when the actual value is set just below this. Signed-off-by: Jouni Malinen <j@w1.fi>
* Do not check unsigned size is less than zeroJouni Malinen2015-06-232-2/+2
| | | | | | | The variables here are unsigned and as such, cannot have a negative value. Use == 0 instead of <= 0 to make this cleaner. Signed-off-by: Jouni Malinen <j@w1.fi>
* dbus: Add RemoveClient method to remove a client from local GOPurushottam Kushwaha2015-06-193-0/+68
| | | | | | | | | | | | This is equivalent to the P2P_REMOVE_CLIENT command on control interface. This can be used to remove the specified client [as object path or string format interface address] from all groups (operating and persistent) from the local GO. Argument(s): peer[object path] OR iface[string format MAC address] Signed-off-by: Purushottam Kushwaha <p.kushwaha@samsung.com> Signed-off-by: Jijo Jacob <jijo.jacob@samsung.com>
* D-Bus: Fix wpas_dbus_register_peer() documentationManeesh Jain2015-06-191-1/+1
| | | | Signed-off-by: Maneesh Jain <maneesh.jain@samsung.com>
* D-Bus: Add missing params in WPS function documentationManeesh Jain2015-06-191-0/+4
| | | | | | | This adds missing parameters in all WPS events related function documentation. Signed-off-by: Maneesh Jain <maneesh.jain@samsung.com>
* D-Bus: Fix function documentation for wpas_dbus_signal_p2p_go_neg_resp()Maneesh Jain2015-06-191-4/+3
| | | | Signed-off-by: Maneesh Jain <maneesh.jain@samsung.com>
* D-Bus: Add function documentation for wpas_dbus_signal_p2p_go_neg_req()Maneesh Jain2015-06-191-0/+10
| | | | | | This is needed to add this function into Doxygen documentation. Signed-off-by: Maneesh Jain <maneesh.jain@samsung.com>
* dbus: Add Reconnect command to D-Bus InterfaceMAYANK HAARIT2015-06-143-0/+33
| | | | | | | This has same behavior as the ctrl_iface RECONNECT command. Signed-off-by: Mayank Haarit <mayank.h@samsung.com> Signed-off-by: Purushottam Kushwaha <p.kushwaha@samsung.com>
* D-Bus: Add WPS pbc-overlap EventAvichal Agarwal2015-06-102-0/+44
| | | | | | | 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 ModelNumber and SerialNumber info into D-Bus peer interfaceAmit Khatri2015-06-103-0/+90
| | | | | Signed-off-by: Amit Khatri <amit.khatri@samsung.com> Signed-off-by: Rahul Jain <rahul.jain@samsung.com>
* P2P: Add ModelName info into D-Bus peer interfaceAmit Khatri2015-06-103-0/+45
| | | | | Signed-off-by: Amit Khatri <amit.khatri@samsung.com> Signed-off-by: Rahul Jain <rahul.jain@samsung.com>