aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd
Commit message (Collapse)AuthorAgeFilesLines
* hostapd: Add comment about '-i' parameter in hostapd.confTim Kourt2016-06-121-0/+2
| | | | Signed-off-by: Tim Kourt <tim.a.kourt@linux.intel.com>
* hostapd: Accept interface names as a command line parameterTim Kourt2016-06-121-4/+67
| | | | | | | | | | | This introduces an optinal command line parameter '-i' to override the value of the 'interface' attribute in hostapd.conf files. This change enables the reuse of the configuration files for the concurrent instances of hostapd. An ability to dynamically assign the interface names simplifies the usages of hostapd service in the automated emulations of the wireless environments. Signed-off-by: Tim Kourt <tim.a.kourt@linux.intel.com>
* hostapd: Fix early init failure pathJouni Malinen2016-06-121-4/+7
| | | | | | | eloop deinit calls could trigger segmentation fault if the early error path is hit before eloop_init() gets called. Signed-off-by: Jouni Malinen <j@w1.fi>
* hostapd Make GAS Address3 field selection behavior configurableJouni Malinen2016-06-102-0/+9
| | | | | | | | | gas_address3=1 can now be used to force hostapd to use the IEEE 802.11 standards compliant Address 3 field value (Wildcard BSSID when not associated) even if the GAS request uses non-compliant address (AP BSSID). Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* nl80211: Use extended capabilities per interface typeKanchanapally, Vidyullatha2016-05-311-0/+9
| | | | | | | | | | This adds the necessary changes to support extraction and use of the extended capabilities specified per interface type (a recent cfg80211/nl80211 extension). If that information is available, per-interface values will be used to override the global per-radio value. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Update ChangeLog files for v2.6Jouni Malinen2016-05-211-0/+55
| | | | | | This adds a summary of changes since the v2.5 release. Signed-off-by: Jouni Malinen <j@w1.fi>
* Use a shared helper function for parsing hostapd.conf IEsJouni Malinen2016-04-201-56/+27
| | | | | | | | wpabuf_parse_bin() can be used to take care of parsing a hexstring to a wpabuf and a shared helper function can take care of clearing the previous value when empty string is used. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Add assocresp_elements parameter for hostapdBala Krishna Bhamidipati2016-04-202-0/+37
| | | | | | | | This new parameter allows hostapd to add Vendor Specific elements into (Re)Association Response frames similarly to the way vendor_elements parameter can be used for Beacon and Probe Response frames. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* hostapd: Add FTM range requestDavid Spinadel2016-04-172-0/+75
| | | | | | | | | | | | | | | | | | | | Add FTM range request via RRM. The AP sends Radio measurement request with FTM range request as a request for the receiving STA to send FTM requests to the given list of APs. The neighbor report part of the request is taken from the neighbor database. The control interface command is: REQ_RANGE <dst addr> <rand_int> <min_ap> <responder> [<responder>..] dst addr: MAC address of an associated STA rand_int: Randomization Interval (0..65535) in TUs min_ap: Minimum AP Count (1..15); minimum number of requested FTM ranges between the associated STA and the listed APs responder: List of BSSIDs for neighboring APs for which a measurement is requested Signed-off-by: David Spinadel <david.spinadel@intel.com>
* hostapd: Add LCI requestDavid Spinadel2016-04-172-0/+39
| | | | | | | Add a hostapd control interface command REQ_LCI to request LCI from an associated station using radio measurement. Signed-off-by: David Spinadel <david.spinadel@intel.com>
* hostapd: Handle Neighbor Report Request frameDavid Spinadel2016-04-172-0/+2
| | | | | | | Process Neighbor Report Request frame and send Neighbor Report Response frame based on the configured neighbor report data. Signed-off-by: David Spinadel <david.spinadel@intel.com>
* hostapd: Add a database of neighboring APsDavid Spinadel2016-04-164-0/+171
| | | | | | | | | | | | | | | | | Add a configurable neighbor database that includes the content of Nighbor Report element, LCI and Location Civic subelements and SSID. All parameters for a neighbor must be updated at once; Neighbor Report element and SSID are mandatory, LCI and civic are optional. The age of LCI is set to the time of neighbor update. The control interface API is: SET_NEIGHBOR <BSSID> <ssid=SSID> <nr=data> [lci=<data>] [civic=<data>] To delete a neighbor use: REMOVE_NEIGHBOR <BSSID> <SSID> Signed-off-by: David Spinadel <david.spinadel@intel.com>
* hostapd: Extend the configuration of RRM capabilitiesDavid Spinadel2016-04-162-1/+16
| | | | | | | | | | | | | Extend the radio_measurements parameter to save all the supported RRM capabilities as it's used in RM enabled capabilities element. Make this parameter not directly configurable via config file (though, keep the radio_measurements parameter for some time for backwards compatibility). Instead, add a configuration option to enable neighbor report via radio measurements. Other features can be added later as well. Signed-off-by: David Spinadel <david.spinadel@intel.com>
* utils: Rename hostapd_parse_bin to wpabuf_parse_bin and move itDavid Spinadel2016-04-091-28/+5
| | | | | | | Make the function available as part of the wpabuf API. Use this renamed function where possible. Signed-off-by: David Spinadel <david.spinadel@intel.com>
* hostapd: Set LCI and Location Civic information in configurationDavid Spinadel2016-04-092-2/+14
| | | | | | | Enable configuration of LCI and location civic information in hostapd.conf. Signed-off-by: David Spinadel <david.spinadel@intel.com>
* Add POLL_STA command to check connectivity in AP modeJouni Malinen2016-04-081-0/+3
| | | | | | | | | The hostapd "POLL_STA <addr>" control interface command can be used to check whether an associated station ACKs a QoS Data frame. The received ACK for such a frame is reported as an event message ("AP-STA-POLL-OK <addr>"). Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Drop USE_KERNEL_HEADERS defineJouni Malinen2016-03-261-4/+0
| | | | | | | | | | This was only used for providing an option to use linux/if_packet.h instgead of netpacket/packet.h in src/ap/iapp.c. However, netpacket/packet.h is nowadays commonly available and hostapd already depends on it through src/l2_packet/l2_packet_linux.c, so there is no need to continue to provide this option for the kernel header. Signed-off-by: Jouni Malinen <j@w1.fi>
* vlan: Move ifconfig helpers to a separate fileJouni Malinen2016-03-252-0/+2
| | | | | | This removes final ioctl() use within vlan_init.c. Signed-off-by: Jouni Malinen <j@w1.fi>
* vlan: Move CONFIG_FULL_DYNAMIC_VLAN functionality into a separate fileJouni Malinen2016-03-252-0/+2
| | | | | | | This cleans up vlan_init.c by removing number of C pre-processor dependencies. Signed-off-by: Jouni Malinen <j@w1.fi>
* vlan: Clean up netlink vs. ioctl API implementationJouni Malinen2016-03-252-16/+12
| | | | | | | | | | | Move the ioctl-based VLAN implementation to a separate file to avoid need for conditional blocks within vlan_ioctl.c. This removes the internal CONFIG_VLAN_NETLINK define, i.e., this is now used only in build configuration (.config) to select whether to include the vlan_util.c (netlink) or vlan_ioctl.c (ioctl) implementation of the functions. Signed-off-by: Jouni Malinen <j@w1.fi>
* Find correct driver for interface additions/removalsRoy Marples2016-03-221-1/+2
| | | | | | | | | Interface additions/removals are not guaranteed to be for the driver listening to the kernel events. As such, send the events to wpa_supplicant_event_global() which can then pick the correct interface registered with wpa_supplicant to send the event to. Signed-off-by: Roy Marples <roy@marples.name>
* FST: Fix a compiler warningJouni Malinen2016-03-201-1/+2
| | | | | | | | | FST_MAX_PRIO_VALUE is unsigned (u32) and some gcc versions warning about comparisong to long int val at least on 32-bit builds. Get rid of this warning by type casesing val to unsigned long int after having verified that it is positive. Signed-off-by: Jouni Malinen <j@w1.fi>
* PMKSA: Flush AP/mesh PMKSA cache by PMKSA_FLUSH commandMasashi Honma2016-03-202-0/+10
| | | | | | | | | This extends the wpa_supplicant PMKSA_FLUSH control interface command to allow the PMKSA list from the authenticator side to be flushed for AP and mesh mode. In addition, this adds a hostapd PMKSA_FLUSH control interface command to flush the PMKSA entries. Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
* PMKSA: Show AP/mesh PMKSA list in PMKSA commandMasashi Honma2016-03-202-0/+10
| | | | | | | | | This extends the wpa_supplicant PMKSA control interface command to allow the PMKSA list from the authenticator side to be listed for AP and mesh mode. In addition, this adds a hostapd PMKSA control interface command to show the same list for the AP case. Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
* hostapd: Use ifname of the current context in debug messagesEliad Peller2016-03-061-3/+2
| | | | | | | In case of multiple BSS configuration, return the current interface name, instead of the first one. Signed-off-by: Eliad Peller <eliad@wizery.com>
* hostapd: Allow use of driver-generated interface addressesEliad Peller2016-03-062-0/+6
| | | | | | | | | Add a new 'use_driver_iface_addr' configuration parameter to allow use of the default interface address generated by the driver on interface creation. This can be useful when specific MAC addresses were allocated to the device and we want to use them for multi-BSS operation. Signed-off-by: Eliad Peller <eliad@wizery.com>
* 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>
* 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-053-8/+292
| | | | | | | | | | | | | | | 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-051-12/+11
| | | | | | | 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-054-124/+22
| | | | | | Use the common functions, structures when UNIX socket ctrl_iface used. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
* Android: Remove superfluous OpenSSL include pathsAdam Langley2016-03-031-1/+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>
* 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>
* FT: Use BSSID as r1_key_holder if no value is configuredMichael Braun2016-02-281-0/+1
| | | | | | | | | | | | | | | | | | | r1_key_holder is an identifier that was always set to zero if unless configured before. See 11.6.1.7.4 of IEEE Std 802.11-2012 which reads "R1KH-ID is a MAC address of the holder of the PMK-R1 in the Authenticator of the AP" See 12.2.2 of IEEE Std 802.11-2012 which reads "Each R0KH-ID and R1KH-ID is assumed to be expressed as a unique identifier within the mobility domain." "The R1KH-ID shall be set to a MAC address of the physical entity that stores the PMK-R1 ..." Defaulting this to BSSID is a more reasonable value since we have not rejected the missing r1_key_holder as invalid configuration. Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
* hostapd_cli: Add support for RAW commandDedy Lansky2016-02-221-0/+55
| | | | | | | Same as for wpa_cli, RAW command is a passthrough to hostapd control interface. Signed-off-by: Dedy Lansky <qca_dlansky@qca.qualcomm.com>
* MBO: Track STA cellular data capability from association requestJouni Malinen2016-02-222-0/+2
| | | | | | | | This makes hostapd parse the MBO attribute in (Re)Association Request frame and track the cellular data capability (mbo_cell_capa=<val> in STA control interface command). Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* hostapd: Add MBO IE to BSS Transition Management Request frameAvraham Stern2016-02-221-1/+59
| | | | | | | | | | | | | | | | Add an option to add MBO IE to BSS Transition Management Request frame. The MBO IE includes the transition reason code, cellular data connection preference, and, if the disassoc imminent bit is set, it may also include re-association retry delay. Otherwise, the re-association retry delay should be set to zero. The additional BSS_TM_REQ argument uses the following format: mbo=<reason>:<reassoc delay>:<cell pref> reason: 0-9 reassoc delay: 0-65535 (seconds; 0 = disabled) cell pref: 0, 1, 255 Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* hostapd: Add MBO IE to Beacon, Probe Response, Association ResponseAvraham Stern2016-02-226-0/+41
| | | | | | | | | | | | | | | | | | Add MBO IE with AP capability attribute to Beacon, Probe Response, and (Re)Association Response frames to indicate the AP supports MBO. Add option to add Association Disallowed attribute to Beacon, Probe Response, and (Re)Association Response frames. Usage: SET mbo_assoc_disallow <reason code> Valid reason code values are between 1-5. Setting the reason code to 0 will remove the Association Disallowed attribute from the MBO IE and will allow new associations. MBO functionality is enabled by setting "mbo=1" in the config file. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
* ctype functions require an unsigned charRoy Marples2016-02-181-2/+2
| | | | | | | | Ensure that characters are represented as unsigned char when using isblank() and isspace(). These function take in a "int c" argument, but it needs to be unsigned for the cases where EOF is not indicated. Signed-off-by: Roy Marples <roy@marples.name>
* Add CONFIG_ELOOP_KQUEUE to defconfigRoy Marples2016-02-181-0/+3
| | | | Signed-off-by: Roy Marples <roy@marples.name>
* VLAN: Add per-STA vif optionMichael Braun2016-02-172-0/+13
| | | | | | | | This allows the stations to be assigned to their own vif. It does not need dynamic_vlan to be set. Make hostapd call ap_sta_set_vlan even if !vlan_desc.notempty, so vlan_id can be assigned regardless. Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
* VLAN: Separate station grouping and uplink configurationMichael Braun2016-02-174-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Separate uplink configuration (IEEE 802.1q VID) and grouping of stations into AP_VLAN interfaces. The int vlan_id will continue to identify the AP_VLAN interface the station should be assigned to. Each AP_VLAN interface corresponds to an instance of struct hostapd_vlan that is uniquely identified by int vlan_id within an BSS. New: Each station and struct hostapd_vlan holds a struct vlan_description vlan_desc member that describes the uplink configuration requested. Currently this is just an int untagged IEEE 802.1q VID, but can be extended to tagged VLANs and other settings easily. When the station was about to be assigned its vlan_id, vlan_desc and vlan_id will now be set simultaneously by ap_sta_set_vlan(). So sta->vlan_id can still be tested for whether the station needs to be moved to an AP_VLAN interface. To ease addition of tagged VLAN support, a member notempty is added to struct vlan_description. Is is set to 1 if an untagged or tagged VLAN assignment is requested and needs to be validated. The inverted form allows os_zalloc() to initialize an empty description. Though not depended on by the code, vlan_id assignment ensures: * vlan_id = 0 will continue to mean no AP_VLAN interface * vlan_id < 4096 will continue to mean vlan_id = untagged vlan id with no per_sta_vif and no extra tagged vlan. * vlan_id > 4096 will be used for per_sta_vif and/or tagged vlans. This way struct wpa_group and drivers API do not need to be changed in order to implement tagged VLANs or per_sta_vif support. DYNAMIC_VLAN_* will refer to (struct vlan_description).notempty only, thus grouping of the stations for per_sta_vif can be used with DYNAMIC_VLAN_DISABLED, but not with CONFIG_NO_VLAN, as struct hostapd_vlan is still used to manage AP_VLAN interfaces. MAX_VLAN_ID will be checked in hostapd_vlan_valid and during setup of VLAN interfaces and refer to IEEE 802.1q VID. VLAN_ID_WILDCARD will continue to refer to int vlan_id. Renaming vlan_id to vlan_desc when type changed from int to struct vlan_description was avoided when vlan_id was also used in a way that did not depend on its type (for example, when passed to another function). Output of "VLAN ID %d" continues to refer to int vlan_id, while "VLAN %d" will refer to untagged IEEE 802.1q VID. Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
* Implement kqueue(2) support via CONFIG_ELOOP_KQUEUERoy Marples2016-02-071-0/+4
| | | | | | | | | | | NOTE: kqueue has to be closed and re-build after forking. epoll *should* do the same, but it seems that wpa_supplicant doesn't need it at least. I have re-worked a little bit of the epoll code (moved into a similar kqueue function) so it's trivial to requeue epoll if needed in the future. Signed-off-by: Roy Marples <roy@marples.name>
* eloop: Add eloop_sock_requeue()Roy Marples2016-02-072-4/+11
| | | | | | | This function can be used to re-build eloop socket tables after forking for eloop implementations that need this. Signed-off-by: Roy Marples <roy@marples.name>
* Add more hostapd.conf documentation for hw_mode with HT/VHTJouni Malinen2016-01-061-5/+9
| | | | | | | Try to make it more obvious that hw_mode=a needs to be used with HT and VHT when using the 5 GHz band. Signed-off-by: Jouni Malinen <j@w1.fi>
* Update copyright notices for the new year 2016Jouni Malinen2016-01-014-7/+7
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* Clone default LIBS value to LIBS_* for other toolsJouni Malinen2015-12-281-0/+15
| | | | | | | | If LIBS is set with some global build system defaults, clone those for LIBS_c, LIBS_h, LIBS_n, and LIBS_p to cover wpa_cli, wpa_passphrase, hostapd_cli, hlr_auc_gw, and nt_password_hash as well. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Server configuration for OCSP stapling with ocsp_multi (RFC 6961)Jouni Malinen2015-12-222-0/+8
| | | | | | | | | | | This adds a new hostapd configuration parameter ocsp_stapling_response_multi that can be used similarly to the existing ocsp_stapling_response, but for the purpose of providing multiple cached OCSP responses. This commit adds only the configuration parameter, but does not yet add support for this mechanism with any of the supported TLS implementations. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>