aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/dbus/dbus_new_handlers.c
Commit message (Collapse)AuthorAgeFilesLines
* Allow TKIP support to be removed from buildDisha Das2020-04-171-1/+16
| | | | | | | | | Add a build flag CONFIG_NO_TKIP=y to remove all TKIP functionality from hostapd and wpa_supplicant builds. This disables use of TKIP as both the pairwise and group cipher. The end result does not interoperate with a WPA(v1)-only device or WPA+WPA2 mixed modes. Signed-off-by: Disha Das <dishad@codeaurora.org>
* STA: Support Extended Key IDAlexander Wetzel2020-03-231-3/+10
| | | | | | | | | | | Support Extended Key ID in wpa_supplicant according to IEEE Std 802.11-2016 for infrastructure (AP) associations. Extended Key ID allows to rekey pairwise keys without the otherwise unavoidable MPDU losses on a busy link. The standard is fully backward compatible, allowing STAs to also connect to APs not supporting it. Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de>
* D-Bus: Use size_t for values theoretically larger than 16-bit intJouni Malinen2020-03-221-3/+3
| | | | | | | These are theoretical cases with 32-bit integers, but cases that could potentially hit an integer overflow with 16-bit int. Signed-off-by: Jouni Malinen <j@w1.fi>
* DBus: Add "sae" to interface key_mgmt capabilitiesBrian Norris2020-02-291-0/+6
| | | | | | | This will be present when the driver supports SAE and it's included in the wpa_supplicant build. Signed-off-by: Brian Norris <briannorris@chromium.org>
* Make WEP functionality an optional build parameterJouni Malinen2020-02-291-4/+11
| | | | | | | | | WEP should not be used for anything anymore. As a step towards removing it completely, move all WEP related functionality to be within CONFIG_WEP blocks. This will be included in builds only if CONFIG_WEP=y is explicitly set in build configuration. Signed-off-by: Jouni Malinen <j@w1.fi>
* DBus: Update dont_quote[] with new network profile parametersJouni Malinen2019-12-251-1/+9
| | | | | | | | | | This array had not been updated for years (since it was initially added) and it was missing new network profile parameters that were not quoted strings (but also not integers that could be set as integer types). Add those missing non-quoted-strings to allow them to be set through the DBus interface. Signed-off-by: Jouni Malinen <j@w1.fi>
* DBus: Remove not existing network profile params from dont_quote[]Jouni Malinen2019-12-251-1/+0
| | | | | | | | These parameters are global parameters, not network profile parameters, and as such, do not below in dont_quote[] which is used to determine whether a network profile parameter needs to be quoted. Signed-off-by: Jouni Malinen <j@w1.fi>
* D-Bus: Add MAC address randomization endpointsEric Caruso2019-10-271-0/+167
| | | | | | | | | | Add D-Bus property: * MACAddressRandomizationMask: a{say} which configure random MAC address functionality in the Wi-Fi driver via netlink. Signed-off-by: Eric Caruso <ejcaruso@chromium.org>
* dbus: Export OWE capability and OWE BSS key_mgmtBeniamino Galvani2019-10-271-3/+9
| | | | | | | | Export a new 'owe' capability to indicate that wpa_supplicant was built with OWE support and accepts 'key_mgmt=OWE'. Also, support 'owe' in the array of BSS' available key managements. Signed-off-by: Beniamino Galvani <bgalvani@redhat.com>
* Remove CONFIG_IEEE80211W build parameterJouni Malinen2019-09-081-8/+0
| | | | | | | | | Hardcode this to be defined and remove the separate build options for PMF since this functionality is needed with large number of newer protocol extensions and is also something that should be enabled in all WPA2/WPA3 networks. Signed-off-by: Jouni Malinen <j@w1.fi>
* dbus: Document more possible BSS/RSA/KeyMgmt valuesLubomir Rintel2019-01-231-1/+6
| | | | | | | | | | This is probably not ideal, since it would be better if it ended up being autogenerated somehow, but at least it's somewhat of an improvement. Also added a comment that encourages keeping the docs in sync. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
* dbus: Expose support of SAE key management in BSS propertiesLubomir Rintel2019-01-221-1/+7
| | | | | | This is going to be useful for NetworkManager and likely others. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
* dbus: Fix build without CONFIG_WNM=yJouni Malinen2019-01-051-0/+4
| | | | | | | | wpa_s->bss_tm_status is within #ifdef CONFIG_WNM, so need to access it through matching condition. Fixes: 80d06d0ca9f3 ("dbus: Export BSS Transition Management status") Signed-off-by: Jouni Malinen <j@w1.fi>
* dbus: Expose authentication status to D-BusAlex Khouderchah2019-01-021-0/+21
| | | | | | | | | | | 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>
* dbus: Export BSS Transition Management statusMatthew Wang2019-01-021-0/+22
| | | | | | | | Add new Interface properties "BSSTMStatus", which carries the status of the most recent BSS Transition Management request. This property will be logged in UMA to measure 802.11v success. Signed-off-by: Matthew Wang <matthewmwang@chromium.org>
* dbus: Export roam time, roam complete, and session lengthMatthew Wang2019-01-021-0/+65
| | | | | | | | | | | Add new Interface properties "RoamTime", "RoamComplete", and "SessionLength". "RoamTime" carries the roam time of the most recent roam in milliseconds. "RoamComplete" carries True or False corresponding to the success status of the most recent roam. "SessionLength" carries the number of milliseconds corresponding to how long the connection to the last AP was before a roam or disconnect happened. Signed-off-by: Matthew Wang <matthewmwang@chromium.org>
* wpa_supplicant: Fix build with !CONFIG_AP and CONFIG_CTRL_IFACE_DBUS_NEWMichal Privoznik2018-12-311-1/+32
| | | | | | | | | If the CONFIG_CTRL_IFACE_DBUS_NEW is enabled but CONFIG_AP is disabled the build fails. This is because dbus getters try to access ap_iface member of wpa_supplicant struct which is defined if and only if CONFIG_AP is enabled. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
* dbus: Expose connected stations on D-BusAndrej Shadura2018-12-231-0/+287
| | | | | | | | | | | | | | | | Make it possible to list connected stations in AP mode over D-Bus, along with some of their properties: rx/tx packets, bytes, capabilities, etc. Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com> Rebased by Julian Andres Klode <juliank@ubuntu.com> and updated to use the new getter API. Further modified by Andrej Shadura to not error out when not in AP mode and to send separate StationAdded/StationRemoved signals instead of changing signatures of existing StaAuthorized/StaDeauthorized signals. Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
* dbus: Expose availability of SHA384 on D-BusLubomir Rintel2018-11-241-2/+5
| | | | | | This lets us know whether we can attempt to use FT-EAP-SHA384. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
* dbus: Expose availability of FT on D-BusLubomir Rintel2018-11-241-2/+5
| | | | | | | This lets us know whether we can attempt to use FT-PSK, FT-EAP, FT-EAP-SHA384, FT-FILS-SHA256 or FT-FILS-SHA384. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
* Revert "D-Bus: Implement Pmf property"Lubomir Rintel2018-11-241-55/+0
| | | | | | | | | | | | | | | | | This reverts commit adf8f45f8af27a9ac9429ecde81776b19b6f9224. It is basically all wrong. The Pmf property did exist, with a signature of "s" as documented in doc/dbus.doxygen. It was synthesized from global_fields[]. The patch added a duplicate one, with a signature of "u", in violation of D-Bus specification and to bemusement of tools that are careful enough: $ busctl introspect fi.w1.wpa_supplicant1 /fi/w1/wpa_supplicant1/Interfaces/666 Duplicate property Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
* dbus: Add FILS to global capabilitiesMasashi Honma2018-04-021-1/+20
| | | | | | | If any of the interfaces supports FILS (and similarly for FILS-SK-PFS), include the "fils" (and "fils_sk_pfs") capability in D-Bus information. Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
* dbus: Add mesh to global capabilitiesSaurav Babu2018-04-011-1/+4
| | | | Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
* dbus: Add FILS key mgmt values into BSS security propertiesMasashi Honma2017-12-161-1/+11
| | | | Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
* dbus: Add new interface property to get mesh groupSaurav Babu2017-09-091-0/+33
| | | | Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
* dbus: Add new interface property to get connected mesh peersSaurav Babu2017-09-091-0/+68
| | | | Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
* dbus: Add method to disable channel switching with a TDLS peerNishant Chaprana2017-05-071-0/+31
| | | | | | | | This patch adds "TDLSCancelChannelSwitch" dbus method on "fi.w1.wpa_supplicant1.Interface" interface to disable channel switching with a TDLS peer. Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
* dbus: Add method to enable channel switching with a TDLS peerNishant Chaprana2017-05-071-0/+119
| | | | | | | | This patch adds "TDLSChannelSwitch" dbus method on "fi.w1.wpa_supplicant1.Interface" interface to enable channel switching with a TDLS peer. Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
* dbus: Add AbortScan method to abort ongoing scanSaurav Babu2017-05-071-0/+21
| | | | Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
* Use os_memdup()Johannes Berg2017-03-071-4/+2
| | | | | | | | | | | | | | | | | | | | | | This leads to cleaner code overall, and also reduces the size of the hostapd and wpa_supplicant binaries (in hwsim test build on x86_64) by about 2.5 and 3.5KiB respectively. The mechanical conversions all over the code were done with the following spatch: @@ expression SIZE, SRC; expression a; @@ -a = os_malloc(SIZE); +a = os_memdup(SRC, SIZE); <... if (!a) {...} ...> -os_memcpy(a, SRC, SIZE); Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* D-Bus: Notify mesh capability if driver supports itSaurav Babu2017-02-261-0/+5
| | | | Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
* dbus: Set mode to mesh in bss properties when mesh is supportedSaurav Babu2017-02-201-1/+5
| | | | Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
* D-Bus: Add GroupMgmt entry into the interface Capabilities dictJouni Malinen2017-01-141-0/+22
| | | | | | | | | This can be used to determine whether the driver supports PMF and if so, with which group management cipher suites. In addition, add the missing pairwise and group cipher suite values to the documentation while adding this new entry there as well. Signed-off-by: Jouni Malinen <j@w1.fi>
* D-Bus: Add pmf to global capabilitiesStijn Tintel2017-01-141-0/+3
| | | | | | | This indicates that the wpa_supplicant binary has been compiled with PMF support. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* D-Bus: Implement Pmf propertyStijn Tintel2017-01-141-0/+55
| | | | | | | The Pmf property is documented in doc/dbus.doxygen, but does not exist, so implement it. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* D-Bus: Fix BSS Mode getter for invalid DMG BSSJouni Malinen2017-01-081-0/+3
| | | | | | | Previous version could have used uninitialized char* when a DMG with invalid capabilities were added to BSS table from scan results. Signed-off-by: Jouni Malinen <j@w1.fi>
* D-Bus: Use a helper function to get possibly NULL stringsJouni Malinen2016-12-231-30/+33
| | | | | | | This type of check is used in quite a few getter functions, so add a helper function to take care of it. Signed-off-by: Jouni Malinen <j@w1.fi>
* D-Bus: Add ConfigFile parameter into the interface propertiesJose Blanquicet2016-08-291-0/+24
| | | | | | | | | 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-181-24/+5
| | | | | | | | | 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-131-4/+1
| | | | | | | | 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: 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-061-0/+21
| | | | | | | | | | (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: 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: Add support for vendor specific elementsAvichal Agarwal2015-12-061-0/+144
| | | | | | | | | | | | | | | | | | 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>
* 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-151-0/+29
| | | | | | | | 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: Expose interface globals via D-Bus propertiesDan Williams2015-10-281-0/+73
| | | | | | | 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-281-133/+161
| | | | | | We'll use it later for global interface properties. Signed-off-by: Dan Williams <dcbw@redhat.com>