Commit message (Collapse)AuthorAgeFilesLines
* hostapd: Add global TERMINATE commandJanusz Dziedzic2016-03-051-0/+2
| | | | | | This will terminate the hostapd process. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
* hostapd: Add INTERFACES ctrl_iface commandJanusz Dziedzic2016-03-051-0/+48
| | | | | | | | | | Return a list of the available interfaces (the main BSS) and optionally with ctrl_iface when the optional "ctrl" parameter is included. This is useful when using UDP ctrl_iface and add interfaces using the ADD command. After that we need to know which UDP port was assigned for the control interface for the added interface. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
* hostapd: Update ctrl_interface for UDP to include the selected portJanusz Dziedzic2016-03-051-0/+7
| | | | | | | | Set up the real ctrl_interface for UDP after having selected the port. This is in format: udp:<port_no>. This is needed to get accurate interface <-> udp_port mapping. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
* wpa_supplicant: Add ctrl parameter to INTERFACES commandJanusz Dziedzic2016-03-051-5/+19
| | | | | | | | "INTERFACES ctrl" can now be used to fetch a list of network interfaces and their control interfaces, e.g., to fetch the UDP port information for the control interface. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
* hostapd: Allow UDP ctrl_iface configuration to set the UDP portJanusz Dziedzic2016-03-052-2/+30
| | | | | | | | | | | | | This allows the UDP port to be set for the per-interface and global control interfaces. The format is: udp:<port_no> For example: hostapd -ddt -g udp:8888 And in the configuration file: ctrl_interface=udp:8877 Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
* hostapd: Add UDP support for ctrl_ifaceJanusz Dziedzic2016-03-054-8/+293
| | | | | | | | | | | | | | | Add UDP support for ctrl_iface: New config option could be set: CONFIG_CTRL_IFACE=udp CONFIG_CTRL_IFACE=udp-remote CONFIG_CTRL_IFACE=udp6 CONFIG_CTRL_IFACE=udp6-remote And hostapd_cli usage: hostapd_cli -i localhost:8877 Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
* ctrl_iface_common: Use sockaddr_storage instead of sockaddr_unJanusz Dziedzic2016-03-054-50/+40
| | | | | | | This is a step towards allowing UDP sockets to be used with the common implementation. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
* hostapd: Use common functions for ctrl_ifaceJanusz Dziedzic2016-03-055-126/+24
| | | | | | Use the common functions, structures when UNIX socket ctrl_iface used. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
* wpa_supplicant: Use common functions for ctrl_ifaceJanusz Dziedzic2016-03-053-71/+6
| | | | | | Use the common functions, structures when UNIX socket ctrl_iface used. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
* Add common ctrl_iface filesJanusz Dziedzic2016-03-052-0/+197
| | | | | | | This is preparation for sharing a single implementation for ctrl_iface functionality in wpa_supplicant and hostapd. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
* wpa_supplicant: Add monitor support for global UDP ctrl_ifaceJanusz Dziedzic2016-03-051-19/+61
| | | | | | | Add monitor support (ATTACH/DETACH) for the global ctrl_iface when using the UDP backend. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
* wpa_supplicant: Share attach/detach/send UDP ctrl_iface functionsJanusz Dziedzic2016-03-051-17/+29
| | | | | | | | Extend the previously per-interface UDP ctrl_iface functions (attach/detach/send) to support operations on the global interface as well. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
* wpa_supplicant: Allow UDP ctrl_iface configuration to set the UDP portJanusz Dziedzic2016-03-051-2/+27
| | | | | | | | | | | | | This allows the UDP port to be set for the per-interface and global control interfaces. The format is: udp:<port_no> For example: wpa_supplicant -Dnl80211 -ddt -g udp:9888 And in the configuration file: ctrl_interface=udp:9877 Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
* P2P: Update peer WFD IE from PD Response and GO Negotiation ResponseAvichal Agarwal2016-03-052-0/+8
| | | | | | | | Update the peer WFD IE information based on WFD elements received in Provision Discovery Response and GO Negotiation Response frames. Signed-off-by: Avichal Agarwal <avichal.a@samsung.com> Signed-off-by: Kyeong-Chae Lim <kcya.lim@samsung.com>
* P2P: Respect p2p_ignore_shared_freq on p2p_group_addEliad Peller2016-03-041-5/+5
| | | | | | | | Make sure wpas_p2p_init_go_params() respects the p2p_ignore_shared_freq configuration option. Choose currently used frequencies only if this option is not set, or if there are no unused channels left. Signed-off-by: Eliad Peller <eliad@wizery.com>
* P2P: Fix shared freq print in wpas_p2p_init_go_params()Eliad Peller2016-03-041-2/+2
| | | | | | | "freq" contains the forced frequency, not the selected one. Print the correct freq instead. Signed-off-by: Eliad Peller <eliad@wizery.com>
* P2P: Update peer listen channel from Probe Request framesIlan Peer2016-03-031-2/+17
| | | | | | | | | | In case a Probe Request frame is received from a known peer P2P Device, update the listen channel based on the P2P attributes in the Probe Request frame. This can be useful for cases where the peer P2P Device changed its listen channel, and the local P2P device is about to start a GO Negotiation or invitation signaling with the peer. Signed-off-by: Ilan Peer <ilan.peer@intel.com>
* P2P: Abort ongoing scan when p2p_find is stoppedBen Rosenfeld2016-03-032-1/+11
| | | | | | | When p2p_find is stopped, send request to the driver in order to cancel an ongoing scan if there is one. Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
* nl80211: Abort an ongoing scan upon scan timeout indicationAyala Beker2016-03-031-1/+9
| | | | | | | | | | Currently, when scan is stuck in the kernel/driver/fw, the nl80211 driver tries to recover by faking a SCAN_RESULTS flow. However, the scan is still stuck in the kernel/driver/fw. To avoid that stuck request, abort it upon scan timeout. Signed-off-by: Ayala Beker <ayala.beker@intel.com>
* tests: Handle different delays in discovery_and_interface_disabledIlan Peer2016-03-031-3/+7
| | | | | | | | | | | | Test different delay intervals between the INTERFACE_DISABLED event and the INTERFACE_ENABLED event for discovery_and_interface_disabled. Previously, only a delay of 1 second was used, in which case the scan results for the P2P_FIND operation were received after the interface was enabled again, and the case the scan results were received while the interface was disabled was not covered. Signed-off-by: Ilan Peer <ilan.peer@intel.com>
* wpa_supplicant: Handle EVENT_SCAN_RESULTS when an interface is disabledIlan Peer2016-03-031-0/+9
| | | | | | | | | | | | | An interface can be disabled while it has an ongoing scan request. In such a case, when the scan results notification is received, it was being ignored (as the interface is already disabled) so the scan state was not cleared. This can cause undetermined behavior for the next scan request. To handle this, clear the scan state when EVENT_SCAN_RESULTS is received and the interface is disabled. Signed-off-by: Ilan Peer <ilan.peer@intel.com>
* WNM: Do not scan based on malformed BSS Transition Management RequestAvraham Stern2016-03-031-0/+11
| | | | | | | | | Verify that when the Candidate List Included bit is set in a BSS Transition Management Request frame, the candidate list actually includes at least one candidate. If no candidates are included, reject the request without scanning. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* tests: BTM Request Preferred Candidate List followed by vendor elementJouni Malinen2016-03-031-0/+11
| | | | | | | This goes through parsing code for a case that was interpreted incorrectly in the past. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* WNM: Fix candidates count in BSS Transition Management RequestAvraham Stern2016-03-031-1/+1
| | | | | | | | | | | | | In BSS Transition Management Request frame, it is possible that vendor specific IEs are included after the candidate list. In this case the candidates count was incremented for each IE although the candidate list is already over which could result in adding all zeros candidates into the neighbor list. Fix that by incrementing the candidates count only for neighbor report elements. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* wpa_cli: Support running action script on global control interfaceIlan Peer2016-03-031-0/+4
| | | | | | | | In case wpa_cli is started with an option to execute an action script, but no interface is specified, wpa_cli might crash in wpa_cli_exec() if arg1 == NULL. Fix this be setting arg1 = "global". Signed-off-by: Ilan Peer <ilan.peer@intel.com>
* EAP-PWD peer: Fix possible memory leak on error pathIlan Peer2016-03-031-1/+1
| | | | | | Fix possible memory leak in eap_pwd_perform_commit_exchange(). Signed-off-by: Ilan Peer <ilan.peer@intel.com>
* Android: Remove superfluous OpenSSL include pathsAdam Langley2016-03-033-3/+0
| | | | | | | | The libcrypto and libssl modules (and their respective static and host versions) use LOCAL_EXPORT_C_INCLUDE_DIRS thus just including the module is sufficient. Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
* HS 2.0R2: Clear fetch_anqp_in_progress if fopen failsDaichi Ueura2016-03-031-0/+1
| | | | | | | | | | Clear wpa_s->fetch_anqp_in_progress when osu-providers.txt can't be opened. An issue happens, for instance, when wpa_supplicant doesn't have correct access permission to the directory specified by osu_dir. If hs20_osu_fetch_done method returns without clearing the flag, 'FETCH_OSU' command will never work correctly. Signed-off-by: Daichi Ueura <daichi.ueura@sonymobile.com>
* Fix CONFIG_WPA_TRACE=y compilation without CONFIG_WPA_TRACE_BFD=yEliad Peller2016-03-031-0/+2
| | | | | | | | | | | | | | | | syms is defined only for WPA_TRACE_BFD: ../src/utils/trace.c: In function ‘wpa_trace_deinit’: ../src/utils/trace.c:372:7: error: ‘syms’ undeclared (first use in this function) free(syms); ^ ../src/utils/trace.c:372:7: note: each undeclared identifier is reported only once for each function it appears in make: *** [../src/utils/trace.o] Error 1 make: *** Waiting for unfinished jobs.... Add appropriate #ifdef. Signed-off-by: Eliad Peller <eliad@wizery.com>
* Add EAP-AKA' and EAP-pwd to wpa_supplicant READMEJouni Malinen2016-03-031-1/+5
| | | | | | The EAP methods were missing from the lists. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Update notes about OpenSSL versionsJouni Malinen2016-03-031-7/+1
| | | | | | Obsolete OpenSSL versions 0.9.* are not supported anymore. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Fix some typos in wpa_supplicant README filesJouni Malinen2016-03-033-8/+8
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* README-P2P: Fix a typoNishant Chaprana2016-03-031-2/+2
| | | | Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
* P2P: Add Dev Info attribute to Probe Request frames in 60 GHzLior David2016-03-033-5/+19
| | | | | | | | When building P2P IE for Probe Request frames in P2P scan, add the device information attribute if the 60 GHz band is included in the scan, since this is required by the P2P specification. Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
* wpa_supplicant: Expose wpas_get_bands() and related APILior David2016-03-033-8/+11
| | | | | | | | Expose the functions wpas_get_bands() and wpas_freq_to_band() and the enum wpa_radio_work_band, since they will be needed outside wpa_supplicant.c. Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
* P2P: Change order of P2P IE and frequencies set upLior David2016-03-031-38/+38
| | | | | | | | | When setting up parameters for P2P scan, calculate the frequencies for the scan before calculating the scan IE. This is because the scan IE calculation may need information about the scan frequencies in use. Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
* Android: Allow wpa_supplicant to write files to osu-info dirKanchanapally, Vidyullatha2016-03-031-1/+12
| | | | | | | | | | | | | This commit allows any process running with group id of AID_WIFI to read/write files to osu-info directory. Also, it allows other users to read and search the osu-info directory. This fixes issues with hs20-osu-client creating a directory for wpa_supplicant use without wpa_supplicant actually having privileges to write there on Android where the wpa_supplicant process does not run as root. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* FST: Enlarge State Transition Timeout (STT)Dedy Lansky2016-03-031-1/+2
| | | | | | | | | | STT guards the exchange of FST Action frames with the peer station. It was observed that sometimes Action frames sending is delayed at driver/FW layers for few hundreds millisec. Enlarge the STT to overcome such cases. Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
* Add error handling for offloaded ACS with vendor command failuresPeng Xu2016-03-031-4/+9
| | | | | | | | In case vendor ACS command returns invalid channel or hardware mode, complete the interface setup with an error code instead of simply return, so that hostapd can properly clean up the interface setup. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Fix scan rescheduling from wpas_stop_pno to check postponed caseJouni Malinen2016-03-031-1/+1
| | | | | | | | | | | | | | Commit 02e122a995dea947a2ad2c0d85190d709f9128b7 ('Reschedule scan from wpas_stop_pno if it was postponed') uses wpa_s->scanning as the only condition for automatically starting a postponed scan request from EVENT_SCHED_SCAN_STOPPED event handler. However, wpa_s->scanning may be set for sched_scan and as such, this can result in unexpected extra scans without there having been any real postponed request. Make this more accurate by verifying that there really is a pending request for a scan before speeding up its start. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: WPA2-Enterprise with EAP-GPSK and PTK rekey enforced by APJouni Malinen2016-03-021-0/+12
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* nl80211: Add more address fields into RX frame debug messageJouni Malinen2016-02-291-2/+3
| | | | | | | This makes it easier to debug issues related to Public Action frame addressing. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: GAS query with another AP while associatedJouni Malinen2016-02-291-0/+38
| | | | | | | This is without PMF to cover the case of Public Action frame to another AP while associated. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* RADIUS: Add Acct-Delay-Time into accounting messagesJouni Malinen2016-02-292-0/+39
| | | | | | | | | | | | | | | | | | This tells to the server how long we have been trying to transmit the message so that the actual time of the message generation can be determined from receive time (ignoring network delays and only at accuracy of one second). For interim updates, only value 0 is used since there are no retransmissions of the same message. For other accounting messages, the initial attempt goes out with value 0 and the retransmissions, if needed, show the number of seconds the message has been waiting in the queue. Update the Identifier and Authenticator in the messages whenever updating the Acct-Delay-Time per RFC 2866, 4.1 requirements. Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: RADIUS Accounting interim update retryJouni Malinen2016-02-291-0/+20
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* RADIUS: Update full message for interim accounting updatesJouni Malinen2016-02-294-43/+112
| | | | | | | | | | | | Instead of using the RADIUS client retransmission design with the old RADIUS message contents for each retry, trigger a completely new interim accounting update instance more quickly (using the same schedule as RADIUS message retransmissions) to improve accounting updates in cases where RADIUS message delivery fails. This allows the server to get up to date information from the time the "retry" message was sent instead of the old information from the time the first failed attempt was sent. Signed-off-by: Jouni Malinen <j@w1.fi>
* Document nas_identifier requirements for RADIUS accountingJouni Malinen2016-02-281-3/+15
| | | | | | | nas_identifier needs to be set to a unique value for RADIUS accounting to work properly. This needs to be unique for each BSS. Signed-off-by: Jouni Malinen <j@w1.fi>
* Replace hostapd_mac_comp_empty() with is_zero_ether_addr()Jouni Malinen2016-02-283-12/+4
| | | | | | | There is no need to maintain two implementations of the functionality. is_zero_ether_addr() is easier to understand, so use it. Signed-off-by: Jouni Malinen <j@w1.fi>
* VLAN: Avoid use of libnl cacheMichael Braun2016-02-281-23/+7
| | | | | | | Using rtnl_link_alloc_cache() is expensive as it fills in all configured links. Using rtnl_link_get_kernel() is much more lightweight. Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
* nl80211: Clean up ifidx properly if interface in a bridge is removedMichael Braun2016-02-282-28/+79
| | | | | | | When an interface is removed while it was in a bridge, the bridge was not removed from the local ifidx list. Signed-off-by: Michael Braun <michael-dev@fami-braun.de>