Ilan Peer [Sun, 25 Aug 2013 08:17:14 +0000 (11:17 +0300)]
P2P: Skip non-P2P interface in p2p_group_remove *
When 'p2p_group_remove *' is called while the station interface
is connected, the flow also disconnects the station interface.
Fix this by skipping non-P2P interfaces in the iteration.
Signed-hostap: Ilan Peer <ilan.peer@intel.com>
David Spinadel [Sun, 25 Aug 2013 07:55:53 +0000 (10:55 +0300)]
WPS: Set currently used RF band in RF Bands attribute
According to WSC specification (Ver 2.0.2, section 8.3), RF Bands
attribute should be set to the specific RF band used for the current
message. Add an option to set wanted band in wps_build_rf_bands() and
add a callback to get the current band from wpa_supplicant and hostapd.
Signed-hostap: David Spinadel <david.spinadel@intel.com>
Ilan Peer [Sun, 25 Aug 2013 07:43:32 +0000 (10:43 +0300)]
nl80211: Start P2P Device when rfkill is unblocked
Signed-hostap: Ilan Peer <ilan.peer@intel.com>
Ilan Peer [Sun, 25 Aug 2013 07:20:54 +0000 (10:20 +0300)]
nl80211: Do not change type to station on P2P interfaces
It is possible that when trying to remove a dynamically added interface,
changing its type to station mode is not possible (since the kernel does
not support so in its interface combinations).
Since P2P interfaces are always dynamically added, avoid changing their
type to station in the deinit_ap() and deinit_p2p_client() nl80211
callbacks, assuming that the interface is about to be removed.
Signed-hostap: Ilan Peer <ilan.peer@intel.com>
Ilan Peer [Sun, 25 Aug 2013 06:48:27 +0000 (09:48 +0300)]
wpa_supplicant: Reduce wait time for control interfaces
Reduce the wait time for the monitor control interfaces to get
messages on wpa_supplicant de-init etc., as this significantly delays
the shutdown of the wpa_supplicant.
Signed-hostap: Ilan Peer <ilan.peer@intel.com>
Arik Nemtsov [Sun, 25 Aug 2013 06:28:50 +0000 (09:28 +0300)]
P2P: Allow separate interface GO to disconnect low-ack STAs
Propagate the disassoc_low_ack setting from the main P2P interface to
the group interface.
Signed-hostap: Arik Nemtsov <arik@wizery.com>
Jouni Malinen [Sat, 24 Aug 2013 21:35:10 +0000 (00:35 +0300)]
FT RRB: Clear pad field to avoid sending out uninitialized data
The pad field in the RRB messages is unused, but it should be
initialized to avoid sending out arbitrary data from stack. This was
also generating number of valgrind complaints about uninitialized memory
accesses in local FT tests.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 24 Aug 2013 20:47:40 +0000 (23:47 +0300)]
tests: Sleep even longer before starting valgrind tests
It looks like some virtual host setups are too slow to get
wpa_supplicant initialized under valgrind and this was triggering test
failures. Work around this by using even a longer wait before test case
execution.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 24 Aug 2013 20:45:11 +0000 (23:45 +0300)]
nl80211: Fix deinit path to unregister nl_mgmt socket
Commit
8e12685c43546d03ced5ec5dc4b56486a1204115 replaced call to
nl80211_mgmt_unsubscribe() on the deinit path with a
wpa_driver_nl80211_set_mode() call. This is not enough to unregister the
bss->nl_mgmt read socket in all cases. Fix this by unconditionally
unsubscribing from the nl80211 events after having change mode to
station.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 24 Aug 2013 20:31:06 +0000 (23:31 +0300)]
Fix DETACH command debug prints to avoid use of freed memory
In case a control interface socket is detached because of sendmsg()
failing for the socket, function call to detach the socket uses a
pointer to the socket information in the structure to be freed. Reorder
code to print socket info before freeing the data to avoid use of freed
memory in case debug prints are enabled.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 24 Aug 2013 18:46:44 +0000 (21:46 +0300)]
tests: Make wpa_supplicant and hostapd executable through valgrind
It looks like valgrind could not under buildbot with the default file
mode. Fix this by making wpa_supplicant and hostapd binaries readable
and executable by everyone.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 24 Aug 2013 18:16:04 +0000 (21:16 +0300)]
tests: Continue even if device reset fails
This may provide better testing coverage by allowing temporary issues
during the test cycle to be ignored.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 24 Aug 2013 17:33:21 +0000 (20:33 +0300)]
tests: Add option to run test cases under valgrind/concurrent P2P
./run-all.sh can now take an optional argument to select whether to run
all test cases as before (default), to run these under valgrind
("valgrind"), to run P2P test cases with concurrent station interface
("concurrent"), or the concurrent P2P test cases under valgrind
("concurrent-valgrind").
valgrind cases report errors if a test case fails or valgrind reports an
error.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 24 Aug 2013 17:31:04 +0000 (20:31 +0300)]
Make global UNIX socket non-blocking for ctrl_iface
This keeps wpa_supplicant from hanging forever if the other end of the
socket dies. This is similar to the earlier commit
4fdc8def8855ce9b90ffbbdc47152ce46ccdcb1e to make the global control
interface befave in the same way.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 24 Aug 2013 16:48:04 +0000 (19:48 +0300)]
tests: Use logger.info() instead of print to get one stream
print and logger.info() were directing output to different locations
(stdout and stderr, respectively) which resulted in buildbot showing
reordered entries. Use logger consistently to avoid that.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 24 Aug 2013 16:41:08 +0000 (19:41 +0300)]
tests: Check for exceptions during TEST-START/STOP
It looks like the NOTE commands can time out in some cases. Avoid
stopping the test run in such a case to get more coverage if this is a
temporary issue.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 24 Aug 2013 16:01:32 +0000 (19:01 +0300)]
tests: Update concurrent P2P setup to match start.sh changes
The design for launching AP mode interfaces was changed, but
start-p2p-concurrent.sh was not updated with matching changes.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Fri, 23 Aug 2013 16:27:25 +0000 (19:27 +0300)]
Change WEP network selection to reject WPA/WPA2 APs
Previously, wpa_supplicant behavior in WEP configuration was to try to
mimic a device that is not aware of WPA/WPA2 and as such, it tried to
connect to a WPA/WPA2 AP with the assumption that the AP could be
providing support for both WEP and WPA/WPA2 stations in the same BSS.
Such APs could have been used during transition from WEP to more secure
options, but that type of deployment have not been used in large number
and are not really of much use anymore taken into account that more or
less all new devices support WPA/WPA2. That combined with the preference
to deprecate WEP justifies removing this use case and making WEP
networking matching more strict by using the knowledge of AP advertising
WPA/WPA2 as an indication of WEP not being supported.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Fri, 23 Aug 2013 14:43:01 +0000 (17:43 +0300)]
WPS: Fix failure path to allow WSC_NACK and EAP-Failure to be exchanged
Commit
c7a67a77195464d667d6f482777a75325b6f3642 forced disconnection
when wpas_clear_wps() is called. Call this function from a registered
timeout when processing a failure event in order to allow the WPS
handshake to be completed with WSC_NACK and EAP-Failure.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jeffin Mammen [Fri, 23 Aug 2013 13:03:15 +0000 (16:03 +0300)]
WPS: Add control interface command for fetching latest status
The new wps_get_status command can be used to fetch the result of the
latest WPS operation and the current PBC state from hostapd.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jeffin Mammen [Fri, 23 Aug 2013 13:01:55 +0000 (16:01 +0300)]
WPS: Track peer MAC address from the last operations
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jeffin Mammen [Fri, 23 Aug 2013 13:51:27 +0000 (16:51 +0300)]
WPS: Track PBC status
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jeffin Mammen [Fri, 23 Aug 2013 13:38:16 +0000 (16:38 +0300)]
WPS: Track result of the latest WPS operation
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jeffin Mammen [Fri, 23 Aug 2013 13:01:30 +0000 (16:01 +0300)]
WPS: Add PBC mode activated/disabled events
This makes it easier to track PBC state on the registrar.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Wed, 31 Jul 2013 14:30:45 +0000 (17:30 +0300)]
WPS: Share a common function for error strings
This makes it easier to maintain the list of WPS_EI_* error values and
matching strings.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Sunil Dutt [Fri, 23 Aug 2013 12:41:05 +0000 (15:41 +0300)]
nl80211: Update the assoc_freq during connect
drv->assoc_freq was not updated during the connect command (neither
during the command's invocation nor after getting the event) unlike with
auth/assoc case where assoc_freq is updated. This resulted in
nl80211_get_link_noise() (and any other function for that matter) using
the improper drv->assoc_freq value with drivers that use the connect
API. Fix this by updating drv->assoc_freq on connect command and when
fetching the frequency from the driver.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Fri, 23 Aug 2013 09:03:28 +0000 (12:03 +0300)]
nl80211: Add more debug prints for DEL_STATION commands
This makes the debug log clearer on AP mode STA operations.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Wed, 7 Aug 2013 09:24:18 +0000 (12:24 +0300)]
VLAN: Simplify no-WEP with VLAN check
No need to have a local variable and two #ifndef blocks for this.
Signed-hostap: Jouni Malinen <j@w1.fi>
Michael Braun [Wed, 7 Aug 2013 09:22:38 +0000 (12:22 +0300)]
WEP: Remove VLAN support from hostapd
This removes WEP with VLAN support and thus avoids increasing
complexity for tagged VLANs.
Signed-hostap: Michael Braun <michael-dev@fami-braun.de>
Rui Paulo [Wed, 7 Aug 2013 08:03:44 +0000 (11:03 +0300)]
bsd: Add a commit routine
Signed-hostap: Rui Paulo <rpaulo@FreeBSD.org>
Rui Paulo [Wed, 7 Aug 2013 08:02:55 +0000 (11:02 +0300)]
bsd: Mark define sta_set_flags() only for hostapd
Signed-hostap: Rui Paulo <rpaulo@FreeBSD.org>
Rui Paulo [Wed, 7 Aug 2013 08:01:12 +0000 (11:01 +0300)]
bsd: Mark the interface down before opening the routing socket
Signed-hostap: Rui Paulo <rpaulo@FreeBSD.org>
Rui Paulo [Wed, 7 Aug 2013 07:57:51 +0000 (10:57 +0300)]
bsd: Compute the RSSI level
Signed-hostap: Rui Paulo <rpaulo@FreeBSD.org>
Rui Paulo [Wed, 7 Aug 2013 07:57:10 +0000 (10:57 +0300)]
bsd: Set IEEE80211_KEY_NOREPLAY in IBSS/AHDEMO mode
Signed-hostap: Rui Paulo <rpaulo@FreeBSD.org>
Rui Paulo [Wed, 7 Aug 2013 07:54:16 +0000 (10:54 +0300)]
bsd: Skip SIOCSIFFFLAGS ioctl when there is no change.
Don't issue SIOCSIFFLAGS if the interface is already up or already down.
Signed-hostap: Rui Paulo <rpaulo@FreeBSD.org>
Sameer Thalappil [Tue, 6 Aug 2013 20:28:40 +0000 (23:28 +0300)]
nl80211: Add stop AP mode event API
Stop AP command can be used by the driver as an event to indicate that
AP mode has stopped operation. WLAN driver may have encountered errors
that has forced the driver to report this event or concurrent operations
on virtual interfaces may have forced AP operation to be stopped. When
in P2P GO mode, wpa_supplicant uses this event to remove P2P group to
keep in sync with the driver state.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Michael Braun [Sun, 4 Aug 2013 18:45:50 +0000 (21:45 +0300)]
VLAN: Remove vlan_tail
Everything in hostapd can be implemented efficiently without vlan_tail.
Signed-hostap: Michael Braun <michael-dev@fami-braun.de>
Jouni Malinen [Thu, 1 Aug 2013 14:00:53 +0000 (17:00 +0300)]
Revert "P2P: Reject p2p_find while P2P connection is in progress"
This reverts commit
ce970851af76ed96d203d56c660c73ba02c99673.
It turned out that this breaks lots of use cases where p2p_find is
issued while already in p2p_listen state. As such, we cannot reject
p2p_find this easily without checking for more specific cases.
Signed-hostap: Jouni Malinen <j@w1.fi>
Deepthi Gowri [Thu, 1 Aug 2013 12:39:47 +0000 (15:39 +0300)]
P2P: Reject p2p_find while P2P connection is in progress
Though p2p_find is not expected during ongoing P2P connection, it is
possible that any third party application issues a p2p_find resulting in
connection failure. Address this by rejecting any p2p_find command while
connection is in progress.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Sunil Dutt [Thu, 1 Aug 2013 07:47:23 +0000 (10:47 +0300)]
TDLS: Handle transmission failures of TPK Handshake messages
A transmission failure of the TDLS Setup Request frame (TPK Handshake
M1) results in no further retries and the peer entry being left in state
where all TDLS Setup Request frames from the peer with higher address
would be rejected, thus always resulting in a failure to establish a
TDLS link. Handle the failures in transmission by disabling the link
immediately to ensure the traffic to the peer goes through the AP. This
commit also handles similar transmision failures for TPK Handshake M2
and M3 frames (TDLS Setup Response and Confirm).
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Wei-Jen Lin [Wed, 31 Jul 2013 20:22:04 +0000 (23:22 +0300)]
P2P: Fix invalid remain-on-channel duration for frame TX
cfg80211 does not allow the zero duration of remain-on-channel. Instead,
use 20 ms as default waiting time when remain-on-channel is used to
schedule offchannel transmission that does not expect a response.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Sean Lin [Wed, 31 Jul 2013 20:09:34 +0000 (23:09 +0300)]
P2P: Do not delay retries on failure during group formation
4-way handshake may fail under extremely noisy environment and if this
happens during P2P group formation, the 10 second extra delay added in
wpas_auth_failed() can result in running over the 15 second timeout.
Avoid this by skipping the delay mechanism in wpas_auth_failed() for the
P2P group formation case. The P2P formation timeout will take care of
stopping the attempts if the failure condition does not get resolved.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Wed, 31 Jul 2013 15:34:16 +0000 (18:34 +0300)]
nl80211: Fix TDLS key configuration to not set TX key index
The nl80211 command for setting the TX index does not distinguish TDLS
vs. AP key and as such, the driver would not know what this set TX key
index operation is doing in the TDLS case. This could result in the TX
key index for AP being changed instead if static WEP is used in the AP
connection. Fix the issue by not setting TX key index when configuring a
TDLS key.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Wed, 31 Jul 2013 10:38:34 +0000 (13:38 +0300)]
tests: Validate AP connection in each TDLS step
Make sure the connection between each STA and the AP is in working state
between each TDLS setup/teardown operation.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Wed, 31 Jul 2013 10:27:41 +0000 (13:27 +0300)]
tests: Pass apdev instead of bssid to TDLS functions
This makes it easier to add new validation steps into TDLS setup and
teardown processes.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Ilan Peer [Sun, 21 Jul 2013 17:51:01 +0000 (20:51 +0300)]
nl80211: Remove unused WPA_DRIVER_FLAGS_MULTI_CHANNEL_CONCURRENT
This is not used anymore after the previous commits that changed the
driver interface to use number of supported concurrent channels instead
of this flag.
Signed-hostap: Ilan Peer <ilan.peer@intel.com>
Signed-hostap: David Spinadel <david.spinadel@intel.com>
Ilan Peer [Sun, 21 Jul 2013 17:38:53 +0000 (20:38 +0300)]
P2P: Use the number of concurrent channels in P2P flows
Change the P2P flows to use the number of concurrent channels
supported by the device and the number of currently used channels
for the P2P flows.
Signed-hostap: Ilan Peer <ilan.peer@intel.com>
Signed-hostap: David Spinadel <david.spinadel@intel.com>
Jouni Malinen [Sun, 21 Jul 2013 17:46:54 +0000 (20:46 +0300)]
Use wpa_drv_shared_freq() if get_radio_name() is not supported
Some driver interfaces may not support the get_radio_name() design and
get_shared_radio_freqs() needs to be aware of such possibility when
determining shared radio frequencies.
Signed-hostap: Jouni Malinen <j@w1.fi>
Ilan Peer [Sun, 21 Jul 2013 17:03:53 +0000 (20:03 +0300)]
Change share_vif_oper_freq() to handle multiple freqs
There are devices that can operate several channels concurrently.
Change shared_vif_oper_freq() to get_shared_radio_freqs() that can
return an array of frequencies currently used by all the virtual
interfaces that share the same radio.
In addition, move it to wpa_supplicant.c, so it can be used by other
modules.
Signed-hostap: Ilan Peer <ilan.peer@intel.com>
Signed-hostap: David Spinadel <david.spinadel@intel.com>
Ilan Peer [Sun, 21 Jul 2013 16:49:47 +0000 (19:49 +0300)]
nl80211: Report the number of concurrent support channels
Previously, drivers only reported if they support multiple concurrent
channels, but did not report the maximum number of supported channels.
Add this reporting to the driver capabilities and add the implementation
to driver_nl80211.
Signed-hostap: Ilan Peer <ilan.peer@intel.com>
Signed-hostap: David Spinadel <david.spinadel@intel.com>
Jouni Malinen [Sun, 21 Jul 2013 13:40:40 +0000 (16:40 +0300)]
Clean up wpa_supplicant_event() with deauth/disassoc helper functions
wpa_supplicant_event() has grown overly large, so it is useful to split
it into smaller pieces.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 21 Jul 2013 13:01:54 +0000 (16:01 +0300)]
tests: Add a test case for IBSS RSN
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 21 Jul 2013 13:01:29 +0000 (16:01 +0300)]
Remove unnecessary nested ifdef CONFIG_AP
Signed-hostap: Jouni Malinen <j@w1.fi>
Antonio Quartulli [Sun, 21 Jul 2013 12:56:53 +0000 (15:56 +0300)]
IBSS RSN: Add peer restart detection
To better support the IBSS/RSN mechanism, wpa_supplicant has to be able
to detect a possible peer reboot and in this case it should start a new
EAPOL handshake.
To perform such reboot detection wpa_supplicant has to perform an Open
Authentication by sending an Authentication frame and then replying to
it. IF an Authentication frame is received when the key have already
been exchanged, wpa_supplicant understands that the peer has rebooted
and can reset its state machine.
Whenever a new peer is added to the IBSS wpa_supplicant will start the
Open Authentication and only after having accomplished it will start the
key exchange. If the driver does not support Authentication frame
exchange initiated from user space, this step is skipped to maintain
previous behavior (just go through EAPOL-Key frame processing).
The Open Authentication was partly supported by the Linux kernel but now
wpa_supplicant can register for Authentication frames, handle it in
userspace and so avoid any possible race condition.
Signed-hostap: Nicolas Cavallari <cavallar@lri.fr>
Signed-hostap: Antonio Quartulli <antonio@open-mesh.com>
Antonio Quartulli [Sun, 21 Jul 2013 12:27:19 +0000 (15:27 +0300)]
nl80211: Register for AUTH frames when joining an IBSS network
In order to correctly handle IBSS/RSN, wpa_supplicant has to register
for any incoming Authentication frmae to properly react when those are
received.
Signed-hostap: Nicolas Cavallari <cavallar@lri.fr>
Signed-hostap: Antonio Quartulli <antonio@open-mesh.com>
Nicolas Cavallari [Sun, 21 Jul 2013 12:24:50 +0000 (15:24 +0300)]
nl80211: Support not specifying the frame frequency
If the frequency is not specified the frame is now sent over
the channel used by the current BSS.
This will also log the payload of each sent CMD_FRAME.
Signed-hostap: Nicolas Cavallari <cavallar@lri.fr>
[antonio@open-mesh.com: commit message reworded]
Signed-hostap: Antonio Quartulli <antonio@open-mesh.com>
Jouni Malinen [Sun, 21 Jul 2013 12:21:38 +0000 (15:21 +0300)]
IBSS RSN: Fix disconnect() with internal SME
Commit
1aef400bf03159d60109ce886943fbd26d88a6c3 implemented IBSS RSN
disconnect() call using sta_deauth() in a way that resulted in NULL
pointer dereference in driver_nl80211.c if SME was in user space. Fix
this by passing the own MAC address in the sta_deauth call.
Signed-hostap: Jouni Malinen <j@w1.fi>
Mohammed Shafi Shajakhan [Sun, 21 Jul 2013 10:20:27 +0000 (13:20 +0300)]
nl80211: Remove redundant assignment of ifindex
wpa_driver_nl80211_finish_drv_init() takes care of assigning
the interface index.
Signed-hostap: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Arend van Spriel [Sat, 20 Jul 2013 14:52:32 +0000 (17:52 +0300)]
TDLS: Tear down TDLS using wpas_drv_tlds_oper() if not external
When the device indicates to take care of TDLS operations the TDLS
setup is done calling wpas_drv_tdls_oper(). This patch does a similar
thing for the teardown. This fixes failure of teardown:
"TDLS: Could not find peer <mac> for link Teardown"
Signed-hostap: Arend van Spriel <arend@broadcom.com>
Chengyi Zhao [Sat, 20 Jul 2013 14:47:02 +0000 (17:47 +0300)]
Cancel delayed scheduled scan when wpa_supplicant cleans up
Because a delayed scheduled scan will access the members of struct
wpa_supplicant which is freed and this can result in a crash,
wpa_supplicant needs to cancel delayed scheduled scan during cleanups.
Signed-hostap: Chengyi Zhao <chengyix.zhao@gmail.com>
Sujith Manoharan [Sat, 20 Jul 2013 14:41:22 +0000 (17:41 +0300)]
WDS: Fix WEP usage with nl80211 wds_sta=1
The static WEP keys have to be configured for the new VLAN
interface that is created for a 4addr WDS peer, not doing so
breaks WEP functionality in nl80211/4addr based WDS links.
Signed-hostap: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Michal Kazior [Sat, 20 Jul 2013 14:28:42 +0000 (17:28 +0300)]
wpa_supplicant: Add support for VHT BSS membership selector
This allows wpa_supplicant to associate to an AP that has VHT BSS
membership selector set to indicate VHT support is required for the BSS.
Without the patch it was impossible to connect to, e.g., hostapd-based
AP that has require_vht=1. wpa_supplicant was complaining with:
hardware does not support required rate 63.0 Mbps
Signed-hostap: Michal Kazior <michal.kazior@tieto.com>
Sujith Manoharan [Sat, 20 Jul 2013 14:20:43 +0000 (17:20 +0300)]
hostapd: Add a config option to control beaconing
In a AP/STA concurrent setup, if the STA interface is continually
scanning, trying to connect to a network, the AP interface
is basically broken since beaconing would be erratic.
This option can be used in a WDS setup where one AP acts as a
Client/AP-Repeater. The Repeater AP interface has to start beaconing
only after the Client interface has established a WDS link with the
"Root AP".
Signed-hostap: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Michal Kazior [Sat, 20 Jul 2013 14:17:32 +0000 (17:17 +0300)]
Add missing host_to_le32() for big endian hosts
Compiling hostapd with VHT enabled on a big endian machine resulted in
an undefined symbol error. Fix this by defining the missing macro.
Signed-hostap: Michal Kazior <michal.kazior@tieto.com>
Jithu Jance [Sat, 20 Jul 2013 13:06:13 +0000 (16:06 +0300)]
nl80211: Ignore disconnect event in case of locally generated request
Previously, there could be two disconnection events in core
wpa_supplicant when going through a case of wpa_supplicant-requested
disconnection with a driver that implements SME internally. This could
result in undesired behavior when a disconnection is followed by a new
connection attempt before the extra event has been received (e.g.,
during fast reassoc or WPS provisioning). Avoid such issues by ignoring
locally generated disconnect events after requesting cfg80211 to
disconnect.
This makes the previously used ignore_next_local_disconnect more
consistent by setting the variable within
wpa_driver_nl80211_disconnect() so that both callers get the same
behavior.
Signed-hostap: Jithu Jance <jithu@broadcom.com>
Jouni Malinen [Thu, 11 Jul 2013 13:42:13 +0000 (16:42 +0300)]
P2P: Report group formation failure on error to start GO mode
There is no need to wait for the 15 second group formation timeout
before indicating P2P group formation failure if GO mode cannot be
started successfully for some reason.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Thu, 11 Jul 2013 13:19:19 +0000 (16:19 +0300)]
Do not block on ctrl_iface monitor events
It looks like some of the global control interface cases ended up
blocking in sendmsg() when trying to send an event. Since this can block
all wpa_supplicant processing for multiple seconds, this is very
undesirable. Avoid this by requesting sendmsg() to return an error
rather than waiting for the message to be sent.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Thu, 11 Jul 2013 13:16:52 +0000 (16:16 +0300)]
WPS: Stop SSDP service before freeing the pending entries
This avoids debug warnings about freeing referenced memory.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Tue, 9 Jul 2013 12:20:17 +0000 (15:20 +0300)]
Remove forgotten Xcode defines
Commit
3962b65858ae5d5226fa504d2d1b4f63e7686a95 removed the Xcode
project files, but missed the defines in build_config.h. Remove these
since there are no users for them in the current snapshot.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Mon, 8 Jul 2013 13:53:05 +0000 (16:53 +0300)]
Interworking: Relax 3GPP info PLMN matching for MNC
3GPP TS 24.232 Annex A.3 allows network operator to advertise only two
digits of MNC even if MNC has three digits. Allow such matches in
network selection. In addition, allow three digit matches of MNC even if
MNC length was assumed to be two to avoid missing networks if MNC length
cannot be determined reliably. Remove the '-' separator from simulated
SIM/USIM cases to allow the new matching rules to work.
Fix the PLMN List information element parsing loop to use the length of
the PLMN List instead of the length of the full 3GPP Cellular Info to
avoid unexpected matches should a new element ever be added by 3GPP.
Finally, add more debug prints from PLMN matching to make the logs
easier to understand.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Junli Zhao [Mon, 8 Jul 2013 09:09:18 +0000 (12:09 +0300)]
WPS: Disconnect when removing existing WPS network block
wpas_clear_wps() was just clearing the current wpa_s->current_ssid
pointer when removing a WPS network block which with the device was
associated. This could leave the association up even though the network
block had already been removed. Prevent this by explicitly disconnecting
from the network instead of such clearing current_ssid.
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Sat, 6 Jul 2013 15:47:25 +0000 (18:47 +0300)]
EAP-EKE: Add server implementation
This adds a new password-based EAP method defined in RFC 6124.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 6 Jul 2013 15:45:38 +0000 (18:45 +0300)]
EAP-EKE: Add peer implementation
This adds a new password-based EAP method defined in RFC 6124.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 6 Jul 2013 15:38:39 +0000 (18:38 +0300)]
EAP-SAKE: Use configured server identity
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 6 Jul 2013 15:38:15 +0000 (18:38 +0300)]
EAP-PSK: Use configured server identity
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 6 Jul 2013 15:37:54 +0000 (18:37 +0300)]
EAP-MSCHAPv2: Use configured server identity
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 6 Jul 2013 15:37:35 +0000 (18:37 +0300)]
EAP-IKEv2 server: Use configured server identity
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 6 Jul 2013 15:37:12 +0000 (18:37 +0300)]
EAP-GPSK server: Use configured server identity
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sat, 6 Jul 2013 15:17:15 +0000 (18:17 +0300)]
Add server identity configuration for EAP server
The new server_id parameter in hostapd.conf can now be used to specify
which identity is delivered to the EAP peer with EAP methods that
support authenticated server identity.
Signed-hostap: Jouni Malinen <j@w1.fi>
Tomasz Bursztyka [Mon, 1 Jul 2013 16:11:34 +0000 (19:11 +0300)]
dbus: Register the AutoScan method call at the right place
Signed-hostap: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Jouni Malinen [Sun, 30 Jun 2013 21:13:11 +0000 (00:13 +0300)]
tests: Use wpa_supplicant global control interface for P2P
This allows more consistent interface to be used regardless of which
P2P driver design is used (especially for P2P management operations
over netdev vs. dedicated P2P_DEVICE).
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 30 Jun 2013 20:32:13 +0000 (23:32 +0300)]
P2P: Do not add ctrl interface for P2P_DEVICE (p2p-dev-*)
Adding a new wpa_supplicant control interface for the dedicated
P2P_DEVICE would be quite confusing for programs that manage P2P
operations. Remove this control interface and require the global control
interface to be used since it will provide consistent interface for both
the new dedicated P2P_DEVICE (non-netdev) and old style P2P management
through a netdev.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 30 Jun 2013 17:21:07 +0000 (20:21 +0300)]
tests: Initialize global wpa_supplicant control interface
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 30 Jun 2013 17:02:25 +0000 (20:02 +0300)]
P2P: Fix TDLS and l2_packet init without P2P Device interface
Commit
c68f6200a72f2b33304f583859b09e57757b9d2a made these calls
conditional on !p2p_mgmt, but forced p2p_mgmt=1 for cases where the
driver does not use the dedicated P2P Device. Fix this by making the
!p2p_mgmt condition apply only if the driver does indicate use of a
dedicated P2P Device.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 30 Jun 2013 10:19:59 +0000 (13:19 +0300)]
Fix non-P2P build after the P2P_DEVICE changes
Commit
c68f6200a72f2b33304f583859b09e57757b9d2a added a call to a
function that exists only for P2P builds. Fix that with #ifdef
CONFIG_P2P.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 30 Jun 2013 09:55:52 +0000 (12:55 +0300)]
Fix build with older OpenSSL versions
Check that SSL_clear_options and SSL_CTX_clear_options are defined
before using them to avoid compilation failures with older OpenSSL
versions that did not include these macros.
Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 30 Jun 2013 09:54:47 +0000 (12:54 +0300)]
nl80211: Silence a compiler warning with older gcc versions
Signed-hostap: Jouni Malinen <j@w1.fi>
Arend van Spriel [Sun, 30 Jun 2013 07:19:31 +0000 (10:19 +0300)]
P2P: Derive group interface name bit more sensibly
The interface name for the P2P group interface is derived from the
P2P management interface. When the P2P management interface is a
P2P Device interface, i.e., p2p-dev-wlanX, the name for the group
interface is abbreviated to p2p-X (X being group index). When the
P2P management interface starts with p2p-dev- use its postfix
instead. So P2P management interface p2p-dev-wlan3 results in group
interface name p2p-wlan3-0.
Signed-hostap: Arend van Spriel <arend@broadcom.com>
Arend van Spriel [Sun, 30 Jun 2013 07:17:47 +0000 (10:17 +0300)]
P2P: Create P2P Device interface if supported
If the capability flag of the driver indicates a dedicated P2P Device is
supported, a P2P Device interface is created.
Create the P2P Device in main interface creation loop when the added
interface flags support and P2P supplicant is not yet initialized
avoiding recursion of add_interface.
Do not register l2_packet for P2P Device interface (both for EAPOL and
for TDLS).
Signed-hostap: Arend van Spriel <arend@broadcom.com>
Jouni Malinen [Sun, 30 Jun 2013 06:58:50 +0000 (09:58 +0300)]
nl80211: Do not indicate P2P_DEVICE support by default
Since the P2P_DEVICE support indication was added to kernel before
everything was working properly, there may be kernel versions in use
with the new mechanism breaking P2P functionality (especially with
mac80211_hwsim). For now, disable P2P_DEVICE support by default and
allow it to be enabled with driver_param=p2p_device=1 in the
configuration file. This default behavior may be changed in the future
once the kernel issues has been resolved in stable releases.
Signed-hostap: Jouni Malinen <j@w1.fi>
Arend van Spriel [Sun, 30 Jun 2013 07:48:44 +0000 (10:48 +0300)]
P2P: Ignore p2p_no_group_iface when driver advertizes P2P_DEVICE support
Setting p2p_no_group_iface means 'use P2P management interface as P2P
connection interface' because it attempts to change the interface type.
The P2P_DEVICE is a dedicated interface and can not be changed. As such
ignore the configuration option.
Signed-hostap: Arend van Spriel <arend@broadcom.com>
Arend van Spriel [Sun, 30 Jun 2013 07:46:19 +0000 (10:46 +0300)]
nl80211: Use wdev id when cancelling wait for frame using P2P_DEVICE
Another function that needs the wdev id when P2P management is done
using the P2P_DEVICE interface.
Signed-hostap: Arend van Spriel <arend@broadcom.com>
Arend van Spriel [Sun, 30 Jun 2013 07:38:41 +0000 (10:38 +0300)]
nl80211: Verify P2P GO/client address with all interface addresses
With P2P Device support there will be two interfaces with their
own MAC address. The P2P Interface Address must be unique so verify
it is.
Signed-hostap: Arend van Spriel <arend@broadcom.com>
Arend van Spriel [Sun, 30 Jun 2013 07:34:48 +0000 (10:34 +0300)]
nl80211: Fix determining phy name for P2P Device
The phy name was determined using /sys/class/net/<ifname> but the P2P
Device is not listed there since it does not have an associated net
device. This patch changes name determination to obtain the name from
the wiphy information provide by nl80211.
Signed-hostap: Arend van Spriel <arend@broadcom.com>
Arend van Spriel [Sun, 30 Jun 2013 07:29:00 +0000 (10:29 +0300)]
nl80211: Fix nl80211_get_wiphy_index() for P2P Device
For P2P Device the netlink message should have wdev identifier
instead of the interface index. This fixes a failure which occurred
executing the P2P_GROUP_ADD command.
Signed-hostap: Arend van Spriel <arend@broadcom.com>
Jouni Malinen [Sat, 29 Jun 2013 21:54:24 +0000 (00:54 +0300)]
Add support for OCSP stapling to validate server certificate
When using OpenSSL with TLS-based EAP methods, wpa_supplicant can now be
configured to use OCSP stapling (TLS certificate status request) with
ocsp=1 network block parameter. ocsp=2 can be used to require valid OCSP
response before connection is allowed to continue.
hostapd as EAP server can be configured to return cached OCSP response
using the new ocsp_stapling_response parameter and an external mechanism
for updating the response data (e.g., "openssl ocsp ..." command).
This allows wpa_supplicant to verify that the server certificate has not
been revoked as part of the EAP-TLS/PEAP/TTLS/FAST handshake before
actual data connection has been established (i.e., when a CRL could not
be fetched even if a distribution point were specified).
Signed-hostap: Jouni Malinen <j@w1.fi>
Arend van Spriel [Tue, 25 Jun 2013 10:56:28 +0000 (13:56 +0300)]
P2P: Remove a call to wpas_p2p_deinit_global()
In wpa_supplicant_deinit(), the function wpas_p2p_deinit_global()
was called. Remove it as it will be called from wpas_deinit_iface()
upon removal of the P2P management interface.
Signed-hostap: Arend van Spriel <arend@broadcom.com>
Arend van Spriel [Tue, 25 Jun 2013 10:52:58 +0000 (13:52 +0300)]
nl80211: Fix P2P group interface creating using P2P Device
When P2P Device is used as P2P management interface the creation of the
P2P group interface fails because MAC address retrieval fails for the
P2P Device interface.
Signed-hostap: Arend van Spriel <arend@broadcom.com>
Arend van Spriel [Tue, 25 Jun 2013 10:51:59 +0000 (13:51 +0300)]
nl80211: Use wdev_id in nl80211_create_iface_once()
For P2P an interface may be created for the P2P client/group. The
create request is done on the P2P management interface, which may
be a P2P Device interface. In that case it needs to use the wdev_id.
Signed-hostap: Arend van Spriel <arend@broadcom.com>
Arend van Spriel [Tue, 25 Jun 2013 10:51:14 +0000 (13:51 +0300)]
nl80211: Use wdev id to obtain P2P Device scan results
In order to get a P2P-DEVICE-FOUND event the supplicant needs to
see a peer device during SEARCH and LISTEN phase. The SEARCH
phase does a scan so obtaining the scan results for the P2P Device
interface needs to be supported, i.e., use the wdev_id.
Signed-hostap: Arend van Spriel <arend@broadcom.com>