aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright notices to include year 2012Jouni Malinen2012-01-017-7/+7
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Do not trigger fast reconnection on locally generated deauth/disassocJouni Malinen2012-01-013-11/+40
| | | | | | | | | | | | | | | The deauthentication and disassociation events from nl80211 were being processed identically regardless of whether the frame was generated by the local STA or the AP. This resulted in fast reconnection mechanism getting triggered even in the case where the disconnection was detected locally (e.g., due to beacon loss) while this was supposed to happen only in the case where the AP is sending an explicit Deauthentication or Disassociation frame with a specific reason code. Fix this by adding a new deauth/disassoc event variable to indicate whether the event was generated locally. Signed-hostap: Jouni Malinen <j@w1.fi>
* Fix BSS property names in the example D-Bus scriptJouni Malinen2012-01-011-2/+2
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* dbus: Fix extra semicolonSyam Sidhardhan2012-01-011-1/+1
| | | | Signed-off-by: Syam Sidhardhan <syamsidhardh@gmail.com>
* dbus: Increase buffer size to fix Introspect XMLJouni Malinen2011-12-311-1/+7
| | | | | | | | | | | Commit e9c3c1afedd2d0c6a0939f40c40701af8c450e1f added a new D-Bus method and that was enough to push the Introspect XML buffer over the previously allocated 8000 bytes. Increase the buffer size to make enough room for P2P interface. In addition, add a debug message to indicate if an XML segment does not fit into the buffer to make this types of failures somewhat easier to catch. Signed-hostap: Jouni Malinen <j@w1.fi>
* Clear EAPOL authWhile and heldWhile values when port is disabledJouni Malinen2011-12-311-0/+18
| | | | | | | | | | | | IEEE Std 802.1X-2004 does not clear authWhile and heldWhile in this case, but doing so allows the timer tick to be stopped more quickly when the port is not enabled. Since these variables are used only within HELD and RECEIVE states, clearing them on initialization does not change actual state machine behavior. This reduces some unnecessary operations in port disabled state and cleans up the wpa_supplicant debug log after disconnection. Signed-hostap: Jouni Malinen <j@w1.fi>
* Remove possible authentication timeout on connection failureJouni Malinen2011-12-311-0/+5
| | | | | | | | | The authentication timeout could be triggered after the connection has already been known to have failed. The event at that point can be confusing, so better cancel the timeout when processing connection failure. Signed-hostap: Jouni Malinen <j@w1.fi>
* WPS: Use single channel scan if AP channel already knownJouni Malinen2011-12-313-4/+25
| | | | | | | | | If the BSSID of the AP is specified in the WPS command, the target AP is likely already in the BSS table and its operating channel is known. Use this information to speed up connection by only scanning the known channel. Signed-hostap: Jouni Malinen <j@w1.fi>
* nl80211: Mark Beacon event debug excessiveJouni Malinen2011-12-301-1/+1
| | | | | | | This can show up way too frequently in AP mode to make debug logs readable at debug level. Signed-hostap: Jouni Malinen <j@w1.fi>
* Use correct (multi-user) target when installing systemd unitsMichał Górny2011-12-294-4/+4
| | | | | | | | | | | The 'network.target' is special (per systemd.special(7)), and is to be brought up indirectly when network is actually configured (i.e. through DHCP or static address settings). Irrelevant of that, all services should be always installed in multi-user.target. [Bug 427]
* WPS: Cancel previous registered wps_registrar_pbc_timeoutSpencer Chang2011-12-291-0/+1
| | | | | | | | Since wps_registrar_pbc_timeout is called to stop PBC, previously registered wps_registrar_pbc_timeout must be canceled when canceling the WPS operation. Signed-off-by: Spencer Chang <jungwalk@gmail.com>
* nl80211: Fix NL80211_CMD_FRAME to not try offchannel without driver supportJouni Malinen2011-12-291-1/+1
| | | | | | | | | | | | The offchanok parameter is hardcoded to one in number of paths and that added NL80211_ATTR_OFFCHANNEL_TX_OK attribute to NL80211_CMD_FRAME unconditional. cfg80211 rejects this with EINVAL if the driver does not indicate support for offchannel TX. Fix this by not requesting offchannel TX depending on driver capabilities. Remain-on-channel operation was used for those cases anyway, so the additional attribute was not really needed for these in the first place. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Stop remain-on-channel prior to starting join-a-group clientJouni Malinen2011-12-291-0/+7
| | | | | | | | | This fixes issues with drivers that do not handle concurrent remain-on-channel and scan operations in a case where Provision Discovery Response frame is not received to stop the Action frame handshake. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Reject p2p_group_add if forced frequency is not acceptableNeeraj Kumar Garg2011-12-271-5/+16
| | | | | | | | | | If the freq parameter is specified and we are already running legacy STA on a different frequency with a driver that does not support multi-channel concurrency, reject p2p_group_add. Same code already exists in the path of P2P connection with go negotiation but is missing for autonomous GO. Signed-hostap: Neeraj Garg <neerajkg@broadcom.com>
* nl80211: Do not stop AP mode Probe Request reporting on Listen stopJouni Malinen2011-12-271-1/+10
| | | | | | | | | | | | When nl80211_setup_ap() has enabled Probe Request reporting, this must not be disabled when P2P Listen state is stopped to avoid breaking AP mode operations. This could happen, e.g., if a Probe Request frame was received from a P2P device that the we are trying to invite to our group (i.e., when operating in GO role). p2p_probe_req_rx() calls p2p_invite_start() in this case and that ends up calling p2p->cfg->stop_listen() which calls probe_req_report() driver op. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Use global->p2p_dev_addr instead of parent->own_addrJouni Malinen2011-12-251-5/+5
| | | | | | | Start using global->p2p_dev_addr more consistently as the P2P Device Address. Signed-hostap: Jouni Malinen <j@w1.fi>
* Add BSSID into blacklist and do not clean blacklist during countermeasuresBartosz Markowski2011-12-251-1/+5
| | | | | If scanning continues during TKIP countermeasures, try to avoid selecting the BSS that triggered the counter measures.
* hostapd: Make inactivity polling configurableYogesh Ashok Powar2011-12-254-1/+14
| | | | | | | | | | | | | | | hostapd uses the poll method to check if the station is alive after the station has been inactive for ap_max_inactivity seconds. Make the poll mechanism configurable so that user can choose to disconnect idle clients. This can be especially useful when some devices/firmwares have restrictions on the number of clients that can connect to the AP and that limit is smaller than the total number of stations trying to use the AP. Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
* Remove obsolete comment on removed PTK rekeying operationJouni Malinen2011-12-241-3/+0
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Increase initial group key handshake retransmit timeout to 500 msJouni Malinen2011-12-241-3/+5
| | | | | | | | | | The 100 ms timeout on retransmitting group key message can be too short for stations that are in power save mode or if there is a large number of association stations. While the retransmission of the EAPOL-Key frame should allow this to be recovered from, it is useful to avoid unnecessary frames to save soem CPU and power. Signed-hostap: Jouni Malinen <j@w1.fi>
* Drop priority level of the logger message for unexpected replay counterJouni Malinen2011-12-241-1/+1
| | | | | | | This can happen frequently during normal EAPOL-Key exchanges and there is no need to log it at info level. Signed-hostap: Jouni Malinen <j@w1.fi>
* nl80211: Fix mgmt RX for device SME in AP mode without monitorJouni Malinen2011-12-231-2/+30
| | | | | | | | Drivers that use device SME in AP mode may still need to be subscribed for Action frame RX when monitor interface is not used. This fixes number of P2P GO operations with ath6kl. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* nl80211: Fix use_monitor driver capability for non-mac80211 driversJouni Malinen2011-12-231-0/+18
| | | | | | | | | Poll command may be enough for mac80211 to figure out whether monitor interface is to be used, but this change did not take into account non-mac80211 drivers that support AP mode without monitor interface. For example, ath6kl needs to get use_monitor disabled. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* nl80211: Show station flush failures in debug logJouni Malinen2011-12-231-1/+7
| | | | Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* nl80211: Add debug prints for mgmt RX subscriptionJouni Malinen2011-12-231-7/+25
| | | | | | | This makes it easier to figure out which management frames has been subscribed to for RX events. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Maintain a list of P2P Clients for persistent group on GOJouni Malinen2011-12-2210-11/+200
| | | | | | | | | | Add a new persistent group network block field, p2p_client_list, to maintain a list of P2P Clients that have connected to a persistent group. This allows GO of a persistent group to figure out more easily whether re-invocation of a persistent group can be used with a specific peer device. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Show persistent group info on P2P_PEER dataJouni Malinen2011-12-223-1/+27
| | | | | | | | | | | | | Add "persistent=<network id>" line to P2P_PEER ctrl_iface data if a persistent group credentials are available for this peer. This makes it easier for external programs to figure out when a persistent group could be re-invoked with this peer. For now, this information is only available on the P2P client, but similar information can be added for GO once a list of P2P clients is maintained with the persistent group data. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Move public P2P_PEER info generation into ctrl_ifaceJouni Malinen2011-12-223-39/+79
| | | | | | | | | | | | | | | | | The P2P module provides access to public peer data in struct p2p_peer_info. Use this to build the P2P_PEER information in ctrl_iface.c instead of providing such text format data from the P2P module. The internal data that was previously built in p2p_get_peer_info() as part of the text format peer data is now available through a separate p2p_get_peer_info_txt() function. This is still included in P2P_PEER output to maintain backwards compatibility with external programs that could have started to use this. However, it should be noted that this data is not really supposed to be used for anything else apart from debugging purposes and its format is subject to change. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Replace p2p_get_peer_info with p2p_peer_known when applicableJouni Malinen2011-12-224-8/+21
| | | | | | | | | p2p_get_peer_info() was used in multiple places just to check whether a specific peer is known. This was not the designed use for the function, so introduce a simpler function for that purpose to make it obvious that the p2p_get_peer_info() function is actually used only in ctrl_iface.c. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Fix a typo in a function documentationJouni Malinen2011-12-221-1/+1
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Store last received GTK for each STAJouni Malinen2011-12-225-4/+26
| | | | | | | This allows info_sta command to be used to fetch the last received GTK separately for each STA. Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Fix EAPOL-Key Key Data decryption for rekey caseJouni Malinen2011-12-221-2/+4
| | | | | | | KEK from TPTK needs to be used instead of from PTK when processing rekeying case similarly to what was already done with KCK. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Send D-Bus ServiceDiscoveryRequest signal for external SD processing윤민홍2011-12-211-1/+4
| | | | | | wpas_notify_p2p_sd_request() needs to be called when p2p_sd_over_ctrl_iface is set to provide SD events over D-Bus similarly to the ctrl_iface events.
* Process EVENT_SCHED_SCAN_STOPPED partially if interface is disabledJouni Malinen2011-12-211-1/+5
| | | | | | | | The internal sched_scanning state needs to be cleared on this event even if the events happen to get ordered in a way that the interface gets disabled just prior to EVENT_SCHED_SCAN_STOPPED event. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Ignore disassociation event in wpa_supplicant AP modeJouni Malinen2011-12-211-0/+10
| | | | | | | | | | | If the driver was associated in station mode just before the AP mode was started, the station mode disassociation event may end up getting delivered to wpa_supplicant only after the AP mode has been started. This can result in unexpected attempt to reassociate back to the network that was previously used in station mode. Avoid this by ignoring the disassociation event. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Do not allow pending listen command override connectJouni Malinen2011-12-211-0/+6
| | | | | | | | | | If p2p_listen is issued during a p2p_scan, a pending after-scan operation is scheduled. However, since there is support for only a single pending operation, this was able to override a previously scheduled pending connect command. This can break some command sequences, so give higher priority to pending connect operation. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* P2P: Fix GO start on interface that has active station connectionJouni Malinen2011-12-211-2/+6
| | | | | | | | | The active station connection triggered wpa_supplicant AP mode startup to try to update Beacon IEs before the AP mode was properly initialized and that resulted in NULL pointer dereference in driver_nl80211.c. Fix this by skipping the IE update before the AP mode is initialized. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Android: nl80211: Work around limited genl_ctrl_resolve()Jouni Malinen2011-12-211-0/+36
| | | | | | | | | Android ICS system/core/libnl_2 has very limited genl_ctrl_resolve() implementation that cannot handle names other than nlctrl. Work around that by implementing more complete genl_ctrl_resolve() functionality within driver_nl80211.c for Android builds. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* Add AP-STA-CONNECTED and DISCONNECTED events to wpa_cli -aNeeraj Kumar Garg2011-12-191-0/+4
| | | | Signed-hostap: Neeraj Kumar Garg <neerajkg@broadcom.com>
* P2P: Use hardcoded idle timeout of 10 seconds in P2P client roleJouni Malinen2011-12-182-7/+33
| | | | | | | | | | | | | The p2p_group_idle configuration parameter is much more useful for GO role, so use a separate hardcoded value of 10 seconds in P2P client role. In practice, this means that the P2P client role will automatically tear down the group when the GO tears down the group. The 10 second timeout is enough to recover from temporary disconnections without unnecessary tearing down the group if the GO is still present and allows the client to connect. Signed-hostap: Jouni Malinen <j@w1.fi>
* P2P: Fix disconnect event not to increase idle timeoutJouni Malinen2011-12-181-1/+3
| | | | | | | | | | | When P2P client is processing a disconnection event, make sure the P2P idle timeout does not get increased, i.e., set a new timeout only if no timeout is in use. wpa_state changes between DISCONNECTED and SCANNING can generate multiple calls to wpas_p2p_notif_disconnect() and previously this was enough to force the idle timeout never hit in practice when in P2P client role. Signed-hostap: Jouni Malinen <j@w1.fi>
* Lower RX_MGMT driver event debug level for Beacon framesJouni Malinen2011-12-182-2/+33
| | | | | | | | This event can be very frequent in AP mode when Beacon frames from neighboring BSSes are delivered to user space. Drop the debug message priority from DEBUG to EXCESSIVE for Beacon frames. Signed-hostap: Jouni Malinen <j@w1.fi>
* Allow linking with libnl-3 (libnl 3.2 and newer)Ben Greear2011-12-182-16/+30
| | | | | | | | | I needed this patch to compile against the latest libnl code. I added this to my config file: CONFIG_LIBNL32=y Signed-hostap: Ben Greear <greearb@candelatech.com>
* P2P: Reduce the idle time in Wait peer connect stateNeeraj Kumar Garg2011-12-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | When waiting for go_neg frame from the peer in WAIT_PEER_CONNECT state, I have observed that sometimes it takes 20 to 30 secs for successful GO negotiation. I also found out that it is because of 1 second idle time, in WAIT_PEER_CONNECT state. While it is good to have 1 second idle time [for doing power-save or doing some other legacy STA Scan or some other useful stuff], this makes GO Negotiation process slow. We wait for 1 second idle and then listen for a random time between 100(min)-300(max) ms. Assume P1 is in WAIT_PEER_CONNECT state and P2 is the one which is now to send go_neg frame. If P2 sends GO Negotiation frame just at the boundary of 300 ms of P1 and assume that P2 takes close to 600-800 ms for one iteration of sending go_neg request (one iteration is GO Negotiation Request frame time + dwell time + listen_time), P2 needs to transmit at least 16-18 Action frames for hitting the listen time of P1. Following patch reduces the idle time to 500 ms. Alternatively we can increase the listen time interval to 500 ms just for WAIT_PEER_CONNECT state.
* P2P: Fix PROBE_REQ_ONLY flag use for Provision Discovery RequestNeeraj Kumar Garg2011-12-181-1/+1
| | | | | | | | | Provision discovery from a known peer should actually check for dev->flags & P2P_DEV_PROBE_REQ_ONLY. This is creating an issue of updating the listen frequency of peer with the PD request frame frequency. PD request frame will be sent by the peer on our local listen frequency. This patch fixes that error. Suggested check has already been implemented in the invitation req receive path.
* P2P: Fix Provision Discovery channel for some join-GO casesJouni Malinen2011-12-185-11/+16
| | | | | | | | | The Provision Discovery Request needs to be sent on the operating channel of the GO and as such, the frequency from the BSS table (scan results) need to override the frequency in the P2P peer table that could be based on the Listen channel of the GO. Signed-hostap: Jouni Malinen <j@w1.fi>
* wpa_supplicant/dbus AP: Add support for WPS Internal RegistrarGustavo Sverzut Barbieri2011-12-181-5/+67
| | | | | | | | | | | When in AP mode, wpa_supplicant is now enabling WPS (only Internal Registrar). WPS.Start() call can be used to initiate WPS negotiation similarly to how this is done in station mode. This was done to ctrl_iface by Jouni Malinen on April 21, 2009 (commit 3ec97afe571f159ea95213262c1c6b89965827d4) Signed-hostap: Gustavo Sverzut Barbieri <barbieri@profusion.mobi>
* P2P: Make GO negotiation peer and group information available over D-BusReinette Chatre2011-12-187-18/+106
| | | | | | | | | | | | | | | | | | The GO negotiation response is very cryptic at the moment. For a success message we only know on which interface the negotiation succeeded, not which peer. For a failure we know the interface also and a status code (number). It will be very useful for clients to know upon receipt of such a message which peer the negotiation occurred with. Now that the peer information is available and the API is changed already, the function composing the D-Bus message might as well include all GO negotiation information. This is done with a dict to make things easier on clients if this result information changes down the line. Signed-hostap: Reinette Chatre <reinette.chatre@intel.com> Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* P2P: Do not include own information in the peer tableMarek Kwaczynski2011-12-181-0/+3
| | | | | | | | | | | | | | | When the station is connected to P2P GO after calling p2p_find command the device sees itself. It is related to lack of filtering itself from clients connected to P2P GO. Step by step: 1. dev1: p2p_group_add 2. dev2: p2p_connect <MAC1> pbc join 3. dev1: wps_pbc 4. dev2: p2p_find Skip P2P client information for our own device from a GO with which we are connected.
* PCSC: Accept 0x67 (Wrong length) as a response to READ RECORDJouni Malinen2011-12-181-1/+1
| | | | | | | | | | It looks like some USIM cards respond with 0x67 (Wrong length) instead of 0x6c to 00 b2 01 04 ff. This was getting rejected in scard_get_record_len(). ETSI TS 102 221 is not very clear on this detail, but it looks fine to accept the 0x67 error value, too, to learn the record length. Signed-hostap: Jouni Malinen <j@w1.fi>