path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Tell user why a channel cannot be used in AP modeBen Greear2011-12-101-2/+9
| | | | Signed-off-by: Ben Greear <greearb@candelatech.com>
* P2P: Remove forgotten TODO commentJouni Malinen2011-12-101-2/+0
| | | | | | The P2P peers are already expired. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Append P2P Device Address to AP-STA-DISCONNECTED eventJithu Jance2011-12-101-8/+20
| | | | | | | | | Append "p2p_dev_addr" parameter to AP-STA-DISCONNECTED event for P2P connections. In addition, for AP-STA-CONNECTED event during P2P connection, the "dev_addr=" print is replaced with "p2p_dev_addr=" to be more consistent with other events. Signed-hostap: Jithu Jance <jithu@broadcom.com>
* nl80211: Store own address in BSSJohannes Berg2011-12-101-17/+12
| | | | | | | | Storing the address in the BSS instead of the DRV struct makes it usable for hostapd and thus gets rid of the linux_get_ifhwaddr() call when receiving a spurious frame. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* Add MSK dump mechanism into hostapd RADIUS server for testingJouni Malinen2011-12-085-2/+47
| | | | | | | | | | | | | | Testing code can now be enabled in the hostapd RADIUS server to dump each derived MSK into a text file (e.g., to be used as an input to wlantest). This functionality is not included in the default build and can be enabled by adding the following line to hostapd/.config: CFLAGS += -DCONFIG_RADIUS_TEST The MSK dump file is specified with dump_msk_file parameter in hostapd.conf (path to the dump file). If this variable is not set, MSK dump mechanism is not enabled at run time. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Add group ifname to P2P-PROV-DISC-* eventsJouni Malinen2011-12-063-4/+8
| | | | | | | | | | If Provision Discovery Request is sent for GO role (i.e., P2P Group ID attribute is included), add the group interface name to the control interface event on the GO. This makes it easier to figure out which ctrl_iface needs to be used for wps_pbc/wps_pin command to authorize the joining P2P client. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Skip duplicated provision discovery on joinJithu Jance2011-12-064-0/+65
| | | | | | | If p2p_prov_disc join command is used prior to p2p_connect join, skip the duplicated provision discovery exchange. Signed-hostap: Jithu Jance <jithu@broadcom.com>
* P2P: Add optional "join" argument for p2p_prov_disc commandJithu Jance2011-12-061-1/+1
| | | | | | | | This can be used to request Provision Discovery Request to be sent for the purpose of joining a running group, e.g., to request the GO to display a PIN that we can then use with p2p_connect join command. Signed-hostap: Jithu Jance <jithu@broadcom.com>
* nl80211: Remove unnecessary struct nl80211_handles wrapperJouni Malinen2011-12-061-65/+59
| | | | | | | | Since the nl_cache is not used anymore, there is no need for maintaining the struct nl80211_handles wrapper for struct nl_handle. Clean this up by using nl_handle directly. Signed-hostap: Jouni Malinen <j@w1.fi>
* nl80211: Listen to unexpected 4addr eventsJohannes Berg2011-12-061-3/+7
| | | | | | | Monitor-less AP mode had lost the ability to do 4addr WDS, this adds it back. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* nl80211: Use global event socket for multicast eventsJohannes Berg2011-12-061-72/+120
| | | | | | | This is a rewrite of Ben Greear's patch, making the nl80211 code use just a single multicast event socket. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* nl80211: Register for Beacon frames in AP modeJohannes Berg2011-12-061-0/+241
| | | | | | | | | When running AP mode, we need to receive beacons over overlapping BSSes to handle protection. Use the new nl80211 command for this. As the command works per wiphy (and we don't want to receive the Beacon frames multiple times) add an abstraction that keeps track of per-wiphy data. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* nl80211: Subscribe to spurious class3 frame eventsJohannes Berg2011-12-061-0/+57
| | | | | | | | These events are necessary to send deauth frames to stations sending spurious data frames. Subscribe to them on the per-BSS event socket. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* nl80211: Use nl80211 for mgmt TX/RX in AP modeJohannes Berg2011-12-061-61/+186
| | | | | | | | | | | | | | | | | To achieve this, multiple things are needed: 1) since hostapd needs to handle *all* action frames, make the normal registration only when in a non-AP mode, to be able to do this use the new socket 2) store the frequency in each BSS to be able to give the right frequency to nl80211's mgmt-tx operation 3) make TX status processing reject non-matched cookie only in non-AP mode The whole thing depends on having station-poll support in the kernel. That's currently a good indicator since the kernel patches are added together. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* EAP server: Force identity request after eapRestart for passthroughJouni Malinen2011-12-061-0/+8
| | | | | | | Fix start of reauthentication after failed authentication with passthrough (external AAA server) to use internal EAP Identity method. Signed-hostap: Jouni Malinen <j@w1.fi>
* Revert "EAP server: Force identity request after INITIALIZE for passthrough"Jouni Malinen2011-12-061-7/+7
| | | | | | | | This reverts commit 204dd3f420bb1ddce02d13d7a366169e0bda914d. start_reauth was not supposed to be used in this way and setting it to TRUE in INITIALIZE breaks internal EAP server. Signed-hostap: Jouni Malinen <j@w1.fi>
* nl80211: Use driver event to indicate failure on authentication retryJouni Malinen2011-12-041-0/+13
| | | | | | | | | When using authentication retry within driver_nl80211.c, a failure on the second attempt has to be indicated with a driver event since the return code from wpa_driver_nl80211_authenticate() is not actually delivered to the core code in that case. Signed-hostap: Jouni Malinen <j@w1.fi>
* nl80211: Recover from auth req ENOENT with a scanJouni Malinen2011-12-041-0/+149
| | | | | | | | | | | | cfg80211 rejects NL80211_CMD_AUTHENTICATE with ENOENT if the BSS entry for the target BSS is not available. This can happen if the cfg80211 entry has expired before wpa_supplicant entry (e.g., during a suspend). To recover from this quickly, run a single channel scan to get the cfg80211 entry back and then retry authentication command again. This is handled within driver_nl80211.c to keep the core wpa_supplicant implementation cleaner. Signed-hostap: Jouni Malinen <j@w1.fi>
* EAP-AKA peer: Keep pseudonym identity across EAP exchangesJouni Malinen2011-12-041-9/+8
| | | | | | | This updates EAP-AKA peer implementation with the changes that previous commits did for EAP-SIM. Signed-hostap: Jouni Malinen <j@w1.fi>
* EAP-SIM peer: Only log the identities that we actually forgetSimon Baatz2011-12-041-7/+6
| | | | [Bug 425]
* EAP-SIM: Keep pseudonym identitySimon Baatz2011-12-041-5/+5
| | | | | | | The pseudonym is a temporary identity, but is no one-time identifier (like the fast re-authentication identity). Thus, do not forget it if the server does not include it in every challenge. There are servers that include the pseudonym identity only at full-auth. [Bug 424]
* Use explicit type casting to avoid sign extensionsJouni Malinen2011-12-041-1/+2
| | | | | | | Make sure sign extension does not end up getting used here by explicitly type casting the variables to correct size. Signed-hostap: Jouni Malinen <j@w1.fi>
* Check nt_password_hash() return codeJouni Malinen2011-12-041-3/+6
| | | | | | | While this is unlikely to fail in practice, better be more consistent in validating nt_password_hash() result. Signed-hostap: Jouni Malinen <j@w1.fi>
* Check wpa_supplicant_parse_ies() return value more consistentlyJouni Malinen2011-12-041-3/+6
| | | | | | | Reject messages that fail to be parsed instead of trying to use partially parsed information. Signed-hostap: Jouni Malinen <j@w1.fi>
* Fix basic_rates copyingJouni Malinen2011-12-041-2/+2
| | | | | | | Commit e5693c4775bae65faa960f80889f98b0a6cb2e1c used incorrect sizeof to copy the basic rates. Signed-hostap: Jouni Malinen <j@w1.fi>
* Fix no-NEED_AP_MLME buildJouni Malinen2011-12-041-1/+1
| | | | | | | | Commit 34445d12eeb2eea53f50e5021e260dc0d07cbbbd forgot to convert the hostapd_prepare_rates() inline wrapper for builds that do not define NEED_AP_MLME. Signed-hostap: Jouni Malinen <j@w1.fi>
* Allow Action frames with unknown BSSID in GO modeArik Nemtsov2011-12-041-0/+5
| | | | | | | | | P2P invitation responses are transmitted with the BSSID set to the peer address. Pass these action frames up to allow the GO to receive the Invitation Response (and avoid sending the Invitation Request multiple times). Signed-off-by: Arik Nemtsov <arik@wizery.com>
* nl80211: Do not encrypt IEEE 802.1X WEP EAPOLJohannes Berg2011-12-031-0/+4
| | | | | | | Set the NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT flag for nl80211 to tell drivers (mac80211) to not encrypt the EAPOL frames for WEP IEEE 802.1X. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* nl80211: Allocate nl CB for BSS RXJohannes Berg2011-12-031-0/+49
| | | | | | | In preparation for things that receive on a BSS-specific handle, allocate a CB for it and hook it up to receive functions. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* nl80211: Rename process_eventJohannes Berg2011-12-031-2/+3
| | | | | | | The next patch will add process_bss_event, rename process_event to process_drv_event to differentiate between them. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* nl80211: Pass cb to eloop functionJohannes Berg2011-12-031-4/+4
| | | | | | | By passing the nl_cb as the context to the eloop function we can (in the next patch) use the same eloop function for BSS events. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* nl80211: Use one CB for driver event RXJohannes Berg2011-12-031-8/+13
| | | | | | | There's no need to clone the CB all the time and then assign it, just use a constant one. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* nl80211: Store frequency in bss structJohannes Berg2011-12-031-11/+12
| | | | | | | | Storing the frequency in the bss struct allows using it for frame commands in AP mode and not relying on the driver struct as much, which is good for hostapd mode. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* nl80211: Move AP SME setup to mode changeJohannes Berg2011-12-031-23/+53
| | | | Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* nl80211: Use socket error queue for EAPOL TX statusJohannes Berg2011-12-031-13/+113
| | | | | | | This will allow getting TX status for EAPOL frames sent as data frames if the driver supports it. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* EAP server: Force identity request after INITIALIZE for passthroughJouni Malinen2011-12-031-7/+7
| | | | | | | | | | | Previously, sm->start_reauth was set to TRUE in SUCCESS2 state to force reauthentication to start with EAP identity request. This works fine for the case of EAP success through the AAA passthrough authentication, but is not enough to handle passthrough authentication failure. sm->identity is set in that case and getDecision would return PASSTHROUGH instead of CONTINUE (to Identity method). Signed-hostap: Jouni Malinen <j@w1.fi>
* nl80211: Ignore interface up event if interface is downJouni Malinen2011-12-031-5/+13
| | | | | | | | The RTM_NEWLINK even can have IFF_UP flag even if the interface is down. Do not generate EVENT_INTERFACE_ENABLED event based on such a message. Signed-hostap: Jouni Malinen <j@w1.fi>
* nl80211: Use binary hexdump for scan IEs instead of textJouni Malinen2011-12-031-2/+2
| | | | | | | The IEs are binary data, so there is not much point in trying to show them as ASCII data in debug prints. Signed-hostap: Jouni Malinen <j@w1.fi>
* Convert hostapd_prepare_rates() to use struct hostapd_ifaceJouni Malinen2011-12-033-23/+23
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Merge set_rate_sets() driver_ops into set_ap()Jouni Malinen2011-12-038-52/+36
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Remove unused parameters from set_rate_sets()Jouni Malinen2011-12-035-15/+7
| | | | | | | Only setting of the basic rate set was supported, so remove the unused parameters. Signed-hostap: Jouni Malinen <j@w1.fi>
* hostapd: Show driver event names in debug logJouni Malinen2011-12-031-0/+3
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* nl80211: Merge ap_isolate configuration into nl80211_set_bss()Jouni Malinen2011-12-031-30/+5
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Fix a typo in a commentJouni Malinen2011-12-031-1/+1
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Fix generated WPS PIN values to use zero-paddingSzymon Bigos2011-12-021-1/+1
| | | | | The dynamically generated PINs are supposed to have 8 digits, but some PIN generatation cases were not zero-padding these properly.
* WPS: Allow RF Bands value to be overriddenBharat Chakravarty2011-11-302-2/+10
| | | | | | | | A new hostapd.conf parameter, wps_rf_bands, can now be used to fix the RF Bands value in cases where hw_mode is not set or when operating a dual band dual concurrent AP. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* WPS: Fix stopping of active WPS operation on dual concurrent APSubrat Dash2011-11-303-0/+31
| | | | | | | | | | When hostapd controls multiple radios, WPS operations are started on all interfaces. However, when the provisioning run had been completed successfully, actiove WPS mode was stopped only a single interface. Fix this to iterate through all interfaces so that this is handled consistently with the starting of WPS operation. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* WPS ER: Fix segfault in some selected registrar change casesJouni Malinen2011-11-304-17/+0
| | | | | | | | | | | | | | | | Commit 628d54639a90f779fd5c98c31e049638de56b17e introduced number of new WPS related ctrl_iface messages to hostapd. Some of these were for ER events which do not make any sense to hostapd that cannot operate as an ER. The WPS_EV_ER_SET_SELECTED_REGISTRAR one from wps_registrar_sel_registrar_changed_event() was especially problematic since it can cause wpa_supplicant ER code segfault due to missing event data. Revert all the ER specific changes from commit 628d54639a90f779fd5c98c31e049638de56b17e to get rid of the segfault and undesired extra code in hostapd. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Android: nl80211: Add Android specific PNO configurationDmitry Shmidt2011-11-291-0/+150
| | | | | | | | | This is based on the Android driver_cmd changes that are converted to use the sched_scan/stop_sched_scan driver_ops for the case where the driver does not support the new nl80211 commands. Change-Id: Iaedc340f84650af422bd2ea57d2a8b0a9d4a5330 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
* Android: wext: Add sched_scan functions for PNODmitry Shmidt2011-11-293-0/+182
| | | | | | | (jm: This is based on the Android change that used driver_cmd. The same implementation is used for the actual driver interface, but the commands are now accessed through sched_scan/stop_sched_scan driver_ops instead of driver_cmd)