path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Allow external programs to request wpa_radio work itemsJouni Malinen2014-01-071-0/+3
| | | | | | | | | | | | The new control interface command RADIO_WORK can be used by external programs to request radio allocation slots from wpa_supplicant if exclusive radio control is needed, e.g., for offchannel operations. If such operations are done directly to the driver, wpa_supplicant may not have enough information to avoid conflicting operations. This new command can be used to provide enough information and radio scheduling to avoid issues with such cases. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Use radio work to protect offchannel Action frame exchangesJouni Malinen2014-01-071-0/+1
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Use radio work for P2P scan requestsJouni Malinen2014-01-053-67/+5
| | | | | | | | | Avoid concurrent P2P scan requests with any other exclusive use of the radio by using the radio work queuing mechanism. This removes some of the earlier workarounds that postponed scans depending on other operations. Signed-hostap: Jouni Malinen <j@w1.fi>
* Add helper functions for cloning and freeing scan parametersJouni Malinen2014-01-051-1/+7
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Remove some unnecessary EAPOL port (un)authorized callbacksJouni Malinen2014-01-021-9/+18
| | | | | | | | | | | If the port status did not change or would not need to get an update after portEnabled changes, there is no need to try to set the driver to use the same value it is already using based on the previous state. Remove such calls to reduce number of operations during reassociation. In addition, this cleans up the debug log by removing unnecessary duplicated entries. Signed-hostap: Jouni Malinen <j@w1.fi>
* Ask driver to report only new scan results if requestedJouni Malinen2014-01-022-0/+15
| | | | | | | | | | | | | | | | | If the BSS table within wpa_supplicant is flushed, request the driver to flush its own scan result table during the next scan. This can avoid unexpected old BSS entries showing up after BSS_FLUSH or FLUSH command in cases where the driver may maintain its internal cache of scan results (e.g., cfg80211 BSS table persists at least for 15 seconds). In addition to doing this automatically on BSS_FLUSH/FLUSH, a new SCAN command argument, only_new=1, can be used to request a manual scan request to do same. Though, it should be noted that this maintains the BSS table within wpa_supplicant. BSS_FLUSH followed by SCAN command can be used to clear all BSS entries from both the driver and wpa_supplicant. Signed-hostap: Jouni Malinen <j@w1.fi>
* Remove hostapd dump_file functionalityJouni Malinen2014-01-022-3/+0
| | | | | | | | | | This debugging mechanism has now been deprecated by the control interface commands that can be used to fetch same internal information from hostapd in a more convenient way. Leave the empty USR1 signal handler and configuration file parameter for backwards compatibility. They can be removed in future versions of hostapd. Signed-hostap: Jouni Malinen <j@w1.fi>
* Make EAPOL dump data available through ctrl_iface STA commandJouni Malinen2014-01-021-9/+25
| | | | | | | The per-STA/Supplicant state information from the EAPOL authenticator is now available through "STA <MAC Address> eapol" command. Signed-hostap: Jouni Malinen <j@w1.fi>
* Convert EAPOL authenticator dump into easier to parse formatJouni Malinen2014-01-022-104/+168
| | | | | | | Use name=value entries one per each line and rename the state entries to have unique names. Signed-hostap: Jouni Malinen <j@w1.fi>
* Add more STA information into the ctrl_iface STA commandJouni Malinen2014-01-022-11/+75
| | | | | | | | | This adds TX/RX statistics and information about association into the per-STA data that is available through the hostapd control interface. In addition, information about the EAP method is now included with the IEEE 802.1X data. Signed-hostap: Jouni Malinen <j@w1.fi>
* Remove forgotten notes about already removed driver wrappersJouni Malinen2014-01-021-5/+4
| | | | | | | | These old driver wrappers have been removed quite some time ago, but some of the build configuration notes were still describing how they are configured. Signed-hostap: Jouni Malinen <j@w1.fi>
* nl80211: Initial support for vendor commands and eventsJouni Malinen2014-01-011-0/+92
| | | | | | | | Print into the debug log the list of vendor commands and events that the driver supports. In addition, add a generic handler for vendor events. This can be extended for each vendor/subcmd. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Send received Presence Response information to ctrl_iface monitorsJouni Malinen2014-01-013-0/+17
| | | | | | | | | The P2P_PRESENCE_REQ command did not give any easily available indication of the response received from the GO. Make this more useful by providing such response (if received) as a ctrl_iface monitor event (P2P-PRESENCE-RESPONSE). Signed-hostap: Jouni Malinen <j@w1.fi>
* ACS: Mark acs_fail() staticJouni Malinen2013-12-311-1/+1
| | | | | | This function is not used outside acs.c. Signed-hostap: Jouni Malinen <j@w1.fi>
* OpenSSL: Include sha1/sha256 header files to verify declarationsJouni Malinen2013-12-311-0/+2
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* WNM: Clean up le16 variable use to avoid sparse warningsJouni Malinen2013-12-311-2/+2
| | | | | | | | intval is marked le16 and should be used through proper byte order conversion functions even if it ended up getting set correctly due to the two operations cancelling each other. Signed-hostap: Jouni Malinen <j@w1.fi>
* Move declaration of hostapd_acs_completed() into correct header fileJouni Malinen2013-12-312-1/+1
| | | | | | | This function is in hw_features.c and as such, should be declared in hw_features.h. Signed-hostap: Jouni Malinen <j@w1.fi>
* Declare wpa_debug_* variables in src/utils/wpa_debug.hJouni Malinen2013-12-316-10/+4
| | | | | | | | | These were somewhat more hidden to avoid direct use, but there are now numerous places where these are needed and more justification to make the extern int declarations available from wpa_debug.h. In addition, this avoids some warnings from sparse. Signed-hostap: Jouni Malinen <j@w1.fi>
* Declare wpa_drivers in src/drivers/driver.hJouni Malinen2013-12-313-3/+6
| | | | | | This avoids some warnings from sparse. Signed-hostap: Jouni Malinen <j@w1.fi>
* nl80211: Add driver param for forcing monitor and connect APIsJouni Malinen2013-12-311-0/+12
| | | | | | | | use_monitor=1 and force_connect_cmd=1 driver parameters can now be used to force older monitor interface design and the connect API (SME in driver) to increase hwsim testing coverage. Signed-hostap: Jouni Malinen <j@w1.fi>
* nl80211: Fix nl_mgmt handling in partial error caseJouni Malinen2013-12-311-13/+14
| | | | | | | | | | | | | If Action frame registration in nl80211_mgmt_subscribe_non_ap() failed for any frame type, the previous implementation skipped nl80211_mgmt_handle_register_eloop() call. This is not desirable since none of the Action frame types could be received and even worse, the following nl80211_destroy_eloop_handle() call for nl_mgmt would likely result in crashing the process due to the ELOOP_SOCKET_INVALID XOR operation. This could be triggered at least in a P2P group interface startup failure case. Signed-hostap: Jouni Malinen <j@w1.fi>
* nl80211: Prefer newer scan result over older during duplicate removalJouni Malinen2013-12-311-3/+5
| | | | | | | | | | | Previously, it was possible for bss_info_handler() to end up dropping a newer scan result entry if there were two entries with the same BSSID and SSID (i.e., only frequency was different) and we were not associated with either. This could happen, e.g., in some P2P use cases where device discovery may happen on different channels. Fix this by checking the age of the scan entries as well to prefer the most recent response. Signed-hostap: Jouni Malinen <j@w1.fi>
* nl80211: Report set_supp_port failures in debug logJouni Malinen2013-12-311-2/+13
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* nl80211: Share a helper function for connect and associate commandsJouni Malinen2013-12-311-130/+77
| | | | | | | Most of the attributes to these commands are identical and there is no need to maintain two copies of the same functionality. Signed-hostap: Jouni Malinen <j@w1.fi>
* Remove unnecessary build #ifdef from definitionsJouni Malinen2013-12-311-2/+0
| | | | | | This type of definition by itself does not change the binary at all. Signed-hostap: Jouni Malinen <j@w1.fi>
* Get rid of duplicated cipher suite and AKM definitionsJouni Malinen2013-12-318-145/+57
| | | | | | | | | | | | | WPA_CIPHER_* and CIPHER_* are used for the exact same set of cipher suites with the main difference being that the WPA_CIPHER_* version is suitable to be used as a bitfield. Similarly, WPA_KEY_MGMT_* and KEY_MGMT_* have similar design for AKMs. There is no need to maintain two separate copies of the definitions since the bitfield compatible version can be used for both needs. Get rid of the CIPHER_* and KEY_MGMT_* versions to clean up the implementation by getting rid of unnecessary mapping functions. Signed-hostap: Jouni Malinen <j@w1.fi>
* nl80211: Use helper functions for cipher suite mappingJouni Malinen2013-12-311-264/+132
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* nl80211: Set control port for NL80211_CMD_COMMANDJouni Malinen2013-12-311-0/+2
| | | | | | | | | NL80211_ATTR_CONTROL_PORT was previously set only for NL80211_CMD_ASSOCIATE, but it should also be set when using NL80211_CMD_COMMAND (driver-based SME) even though none of the current non-mac80211 drivers use this. Signed-hostap: Jouni Malinen <j@w1.fi>
* nl80211: Clean up regulatory rule debug printsJouni Malinen2013-12-301-32/+20
| | | | | | Combine maximum bandwidth and EIRP into a single debug print. Signed-hostap: Jouni Malinen <j@w1.fi>
* nl80211: Print frame registration match on same debug lineJouni Malinen2013-12-301-4/+5
| | | | | | This makes debug log a bit more readable. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Remove WPA_DRIVER_FLAGS_P2P_MGMT optionJouni Malinen2013-12-293-972/+1
| | | | | | | | | | | | | The option of handling upper layer P2P management operations within the driver/firmware was originally planned to be used with wpa_supplicant, but this has not really happened and there is no clear sign of this being needed in the near term either. This functionality has not been completed and it is certainly not being kept up-to-date or tested. As such, it is best to remove it for now and if this or something similar is needed in the future, it can be brought back once a clear need for it has been demonstrated first. Signed-hostap: Jouni Malinen <j@w1.fi>
* SAE: Fix ECC element y coordinate validation stepJouni Malinen2013-12-291-1/+1
| | | | | | | | prime_len was added to the start pointer twice and because of this, the actual y coordinate was not verified to be valid. This could also result in reading beyond the buffer in some cases. Signed-hostap: Jouni Malinen <j@w1.fi>
* EAP-EKE: Allow forced algorithm selection to be configuredJouni Malinen2013-12-291-4/+46
| | | | | | | | | | phase1 parameters dhgroup, encr, prf, and mac can now be used to specify which algorithm proposal is selected, e.g., with phase1="dhgroup=3 encr=1 prf=1 mac=1" selecting the mandatory-to-implement case. This is mainly for testing purposes, but can also be used to enforce stronger algorithms to be used. Signed-hostap: Jouni Malinen <j@w1.fi>
* Remove unused information element parsing dataJouni Malinen2013-12-292-25/+0
| | | | | | | | These information elements are not really used anywhere in hostapd or wpa_supplicant nor is there any plan to use them. As such, there is no need to keep the code here either, so save couple of bytes here. Signed-hostap: Jouni Malinen <j@w1.fi>
* Remove unnecessary EVENT_RX_ACTIONJouni Malinen2013-12-298-205/+68
| | | | | | | | | | | | This driver event was used separately for some Action frames, but all the driver wrappers converted to this from information that would have been enough to indicate an EVENT_RX_MGMT event. In addition, the received event was then converted back to a full IEEE 802.11 management frame for processing in most cases. This is unnecessary complexity, so get rid of the extra path and use EVENT_RX_MGMT for Action frames as well as other management frame subtypes. Signed-hostap: Jouni Malinen <j@w1.fi>
* Define __maybe_unusedJouni Malinen2013-12-291-0/+8
| | | | | | | | This can be used to silence compiler warnings in cases where #ifdef blocks can leave some variables or functions unused and there is no cleaner way of avoiding the warnings. Signed-hostap: Jouni Malinen <j@w1.fi>
* Do not process Action frames twice in hostapd SME/MLMEJouni Malinen2013-12-293-45/+65
| | | | | | | | | | | | | | | | | Commit 88b32a99d30894b2d6bb391371c442fc117edbab added support for using some Action frame processing in hostapd for drivers that handle most of SME/MLME internally (it added FT, this has since be extended for SA Query and WNM). However, this was added in a way that ended up getting both the hostapd_rx_action() and hostapd_action_rx() called for Action frames. This could result in an attempt to process FT, SA Query, and WNM Action frames twice. There is need for more significant cleanup in Action frame processing in hostapd depending on the driver type, but as a simple step to avoid issues, skip the hostapd_action_rx() call if hostapd_rx_action() processed the frame. Signed-hostap: Jouni Malinen <j@w1.fi>
* Fix whitespace styleJouni Malinen2013-12-292-4/+4
| | | | | | | Commit 88b32a99d30894b2d6bb391371c442fc117edbab added couple of lines with incorrect indentation. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Remove unused send_wpabuf()Jouni Malinen2013-12-292-18/+0
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Make sure reconfiguration timeout is not left behind on deinitJouni Malinen2013-12-291-0/+1
| | | | | | | | | | | Even though this is a short timeout, it is at least theoretically possible for the interface to be removed while waiting for reconfiguration to start. Avoid issues with this by cancelling the timeout on any WPS interface deinit. In theory, this should be postponed until interface removal, but that does not fit very nicely to the current wps_hostapd.c style. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Allow testing mode to disable 2.0 functionalityJouni Malinen2013-12-291-0/+5
| | | | | | | | | Previously, wps_version_number was used only to test extensibility to newer version numbers, but it can also be used to enable testing of older versions (1.0), e.g., to avoid hitting some 2.0 specific validation steps. Signed-hostap: Jouni Malinen <j@w1.fi>
* Remove unused wps_device_data_dup()Jouni Malinen2013-12-292-21/+0
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Remove unnecessary extra tracking of eloop registrationJouni Malinen2013-12-291-24/+9
| | | | | | | | It is fine to try to cancel a registration that does not exist, so there is no need to have the duplicated checks for eloop timeout and socket registration. Signed-hostap: Jouni Malinen <j@w1.fi>
* Replace unnecessary hex_value() with hex2byte()Jouni Malinen2013-12-291-15/+1
| | | | | | | There is no need to maintain two functions for doing the same type of hex-to-binary conversion. Signed-hostap: Jouni Malinen <j@w1.fi>
* Enable FT with SAEJouni Malinen2013-12-297-11/+27
| | | | | | | | It was already possible to configure hostapd and wpa_supplicant to use FT-SAE for the key management, but number of places were missing proper AKM checks to allow FT to be used with the new AKM. Signed-hostap: Jouni Malinen <j@w1.fi>
* nl80211: Fix protected Action frame reporting for AP modeJouni Malinen2013-12-293-1/+20
| | | | | | | | | | | | Action frame RX report through EVENT_RX_ACTION did not indicate whether the frame was protected or not even though that information is available in mlme_event_mgmt(). hostapd_rx_action() has a workaround for setting the protected flag for SA Query frames, but that did not apply for other frames, like FT Action. This broke FT-over-DS when PMF is enabled with newer kernel versions (i.e., the ones that do not use monitor interface for receiving management frames). Signed-hostap: Jouni Malinen <j@w1.fi>
* Fix PeerKey 4-way handshakeJouni Malinen2013-12-282-0/+29
| | | | | | | | | | | The earlier changes to buffer EAPOL frames when not associated to avoid race conditions (especially commit 3ab35a660364dc68eaebfc0df6130071bbee6be5 but maybe something even before that) broke PeerKey 4-way handshake. Fix this by using a separate check before the race condition workaround to process PeerKey 4-way handshake EAPOL-Key messages differently. Signed-hostap: Jouni Malinen <j@w1.fi>
* Fix PeerKey deinit behaviorJouni Malinen2013-12-282-1/+2
| | | | | | | PeerKey entries need to be removed on disassociation and this needs to be done in a way that cancels the possibly pending eloop timeout. Signed-hostap: Jouni Malinen <j@w1.fi>
* WNM: Move disassociation imminent sending to wnm_ap.cJouni Malinen2013-12-272-0/+38
| | | | | | | This gets all WNM BSS Transition Management frame building and sending within hostapd into the same location. Signed-hostap: Jouni Malinen <j@w1.fi>
* hostapd: Make STA flags available through ctrl_iface STA commandJouni Malinen2013-12-273-1/+43
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>