Jouni Malinen [Wed, 19 Jan 2011 12:00:14 +0000 (14:00 +0200)]
wlantest: Add TDLS entry on TDLS Setup Request
This will make the TDLS counters available even if setup fails.
Jouni Malinen [Mon, 17 Jan 2011 17:52:35 +0000 (19:52 +0200)]
wlantest: Check WPA/RSN IE match between AssocReq and Beacon
Note unexpected WPA/RSN IE in AssocReq and ignore them if the last
Beacon/ProbeResp from the AP is not advertising support for
WPA/RSN.
Jouni Malinen [Mon, 17 Jan 2011 10:21:29 +0000 (12:21 +0200)]
AP: Validate management frame length
Make sure that received management frames are long enough before
processing them. This avoids a potential segmentation fault if a
driver delivers an invalid frame all the way to hostapd.
Dan Harkins [Sun, 16 Jan 2011 11:12:07 +0000 (13:12 +0200)]
EAP-pwd: Fix some interoperability issues
The changes are:
1. the word "and" in the hunting-and-pecking string passed to the KDF
should be capitalized.
2. the primebitlen used in the KDF should be a short not an int.
3. the computation of MK in hostap is based on an older version of the
draft and is not the way it's specified in the RFC.
4. the group being passed into computation of the Commit was not in
network order.
Jouni Malinen [Sun, 16 Jan 2011 11:02:11 +0000 (13:02 +0200)]
EAP-pwd: Use os_free to free memory allocated with os_malloc
The direct use of free() caused a crash with CONFIG_WPA_TRACE=y.
Jouni Malinen [Sat, 15 Jan 2011 14:57:08 +0000 (16:57 +0200)]
WPA: Add more info for EAPOL-Key Nonce/MIC debugging
Jouni Malinen [Sat, 15 Jan 2011 14:55:15 +0000 (16:55 +0200)]
IBSS RSN: Do not start multiple Auth/Supp for same peer
This avoids an issue when a received EAPOL-Key frame from a peer
is initiating IBSS RSN Authenticator and Supplicant for the peer
and the following new-STA-in-IBSS event from the driver is adding
yet another instance of Authenticator/Supplicant. The EAPOL-Key
RX case was already checking whether an instance had been started;
the driver new-STA event needs to do same.
Jouni Malinen [Sat, 15 Jan 2011 12:07:02 +0000 (14:07 +0200)]
IBSS RSN: Delay setting of the initial TX GTK
The driver may get confused if we set the initial TX GTK before having
fully configured and connected to an IBSS, so better delay this
operation until the connection (join/start IBSS) has been completed.
Jouni Malinen [Fri, 14 Jan 2011 15:43:17 +0000 (17:43 +0200)]
wlantest: Add support for decrypting WEP frames
Jouni Malinen [Fri, 14 Jan 2011 14:32:59 +0000 (16:32 +0200)]
wlantest: Add more details for CCMP MIC failures
Jouni Malinen [Fri, 14 Jan 2011 14:32:14 +0000 (16:32 +0200)]
wlantest: Fix masking of CCMP AAD QC field
Chao-Wen Yang [Thu, 13 Jan 2011 16:04:33 +0000 (18:04 +0200)]
WPS: Indicate WPS-FAIL event on EAPOL timeout-based failure callback
If the EAPOL processing times out (e.g., if the AP stops replying
to messages for some reason) during WPS negotiation, we need to
indicate WPS-FAIL event from eapol_cb since no other WPS failure is
reported for this particular case.
Chao-Wen Yang [Thu, 13 Jan 2011 15:50:59 +0000 (17:50 +0200)]
WPS: Add mechanism for indicating non-standard WPS errors
Previously, only the Configuration Error values were indicated in
WPS-FAIL events. Since those values are defined in the specification
it is not feasible to extend them for indicating other errors. Add
a new error indication value that is internal to wpa_supplicant and
hostapd to allow other errors to be indicated.
Use the new mechanism to indicate if negotiation fails because of
WEP or TKIP-only configurations being disallows by WPS 2.0.
Jouni Malinen [Wed, 12 Jan 2011 11:48:55 +0000 (13:48 +0200)]
P2P: Check GO Neg Req retransmit limit in p2p_listen_end
This needs to be done both in the more normal location in
p2p_timeout_connect_listen() (internal timeout after driver event) and
in p2p_listen_end() as a workaround for the case where the driver event
is delayed to happen after the internal timeout.
Jouni Malinen [Mon, 10 Jan 2011 18:41:04 +0000 (20:41 +0200)]
test-sha1: Add test vectors from RFC 6070
The test with very large iterations count is commented out since it
takes quite long to derive (it does pass, though). In addition, the
last test vector is commented out since pbkdf2_sha1() does not support
arbitrary binary passphrases (\0 inside the string).
Jouni Malinen [Sun, 9 Jan 2011 17:54:50 +0000 (19:54 +0200)]
nl80211: Set NL80211_ATTR_KEY_DEFAULT_TYPES based on set_key addr
This allows mac80211 to configure default keys properly for RSN IBSS
mode.
Jouni Malinen [Sun, 9 Jan 2011 17:44:28 +0000 (19:44 +0200)]
Use set_key addr to distinguish default and multicast keys
Previously, both NULL and ff:ff:ff:ff:ff:ff addr were used in various
places to indicate default/broadcast keys. Make this more consistent
and useful by defining NULL to mean default key (i.e., used both for
unicast and broadcast) and ff:ff:ff:ff:ff:ff to indicate broadcast
key (i.e., used only with broadcast).
Jouni Malinen [Sun, 9 Jan 2011 17:18:50 +0000 (19:18 +0200)]
nl80211: Avoid infinite loop when searching a BSS
When hostapd is removing a virtual BSS interface, the loop here was
incorrectly not updating the iterator during list traversal and
ended up in an infinite loop in some cases.
Jouni Malinen [Sun, 9 Jan 2011 10:50:57 +0000 (12:50 +0200)]
Move hostap driver specific workaround into the driver wrapper
Jouni Malinen [Sun, 9 Jan 2011 10:18:36 +0000 (12:18 +0200)]
Do not use set_tx=1 when clearing keys with set_key
Jouni Malinen [Sun, 9 Jan 2011 10:12:48 +0000 (12:12 +0200)]
Use key=NULL when clearing PTK with set_key
The key clearing operations are using NULL everywhere else, so make
this consistent with other callers.
Jouni Malinen [Sun, 9 Jan 2011 10:09:04 +0000 (12:09 +0200)]
Use more consistent set_key seq value when nothing is being set
Use NULL instead of (u8 *) "" as the seq value and make sure the
driver wrapper implementations can handle NULL value. This was
previously already done in number of places, but not everywhere.
Jouni Malinen [Fri, 7 Jan 2011 15:09:09 +0000 (17:09 +0200)]
wlantest: Add STA counter prot_data_tx
Jouni Malinen [Fri, 7 Jan 2011 14:52:56 +0000 (16:52 +0200)]
wlantest: Add counters for AP deauth/disassoc while asleep/awake
These can be used to check whether the STA is in power save mode
and because of that, is not seeing disconnection notifications.
Jouni Malinen [Fri, 7 Jan 2011 13:54:58 +0000 (15:54 +0200)]
wlantest: Track station PS state
Jouni Malinen [Fri, 7 Jan 2011 12:17:08 +0000 (14:17 +0200)]
wlantest: Add more details for replay debug messages
These make it easier to find the frame in question when looking at
the capture in Wireshark.
Jouni Malinen [Wed, 5 Jan 2011 09:49:03 +0000 (11:49 +0200)]
WPS: Make WPS-AP-AVAILABLE* events a bit more consistent
The BSS table entries may be in more or less random order and it is
better to show the most likely WPS configuration method in a way that is
somewhat more consistent instead of just showing the method of the first
BSS entry found in the table.
Jouni Malinen [Wed, 5 Jan 2011 08:41:51 +0000 (10:41 +0200)]
wlantest: Skip frames inserted by wlantest when reading pcap file
This makes debug output clearer when re-reading a file that has
previously been processed and decrypted by wlantest.
Jouni Malinen [Mon, 3 Jan 2011 17:28:40 +0000 (19:28 +0200)]
wlantest: Count number of STA ACK'ed Deauth/Disassoc frames
Jouni Malinen [Mon, 3 Jan 2011 14:54:14 +0000 (16:54 +0200)]
wlantest: Add ping_ok_first_assoc STA counter
This can be used to verify whether ping goes through between
clearing of the STA counters and the first (re)association.
Jouni Malinen [Thu, 30 Dec 2010 16:27:33 +0000 (18:27 +0200)]
Fix wpa_supplicant_ssid_bss_match() handler for non-WPA
The proto configuration may be left to non-zero when moving from one
configuration to another. To avoid misidentifying a network
configuration as enabling WPA, check key_mgmt field, too.
Shan Palanisamy [Mon, 20 Dec 2010 10:35:57 +0000 (12:35 +0200)]
atheros: Rename "madwifi_" prefix to "atheros_"
Yi Zhu [Thu, 9 Dec 2010 19:30:20 +0000 (11:30 -0800)]
bsd: Fix receive buffer alignment issue
wpa_supplicant seems to crash from time to time on a NetBSD 4.0 MIPS
platform. The root cause turned out to be a MIPS alignment issue.
In my wpa_supplicant crash case, in function
wpa_driver_bsd_event_receive (from driver_bsd.c), the buf[2048] address
is started from i.e. 0x7fffd546, which is not 4 bytes aligned. Later
when it is casted to (struct if_msghdr *), and rtm->rtm_flags is used.
rtm->rtm_flags is "int" type, but its address is not 4 bytes aligned.
This is because the start address of rtm is not 4 bytes aligned.
Unfortunately in NetBSD MIPS kernel (unlike Linux MIPS kernel emulates
unaligned access in its exception handler), the default behavior is to
generate a memory fault to the application that accesses unaligned
memory address. Thus comes the early mentioned wpa_supplicant crash. An
interesting note is when I'm using the wpa_supplicant version 0.4.9, I
never saw this problem. Maybe the stack layout is different. But I
didn't look into details.
I used below patch to resolve this problem. Now it runs correctly for at
least several hours. But you might have a better fix (maybe we can use
malloc/free so that it is at least cache line aligned?). I'm also not
sure if other drivers should have the same problem.
Yi Zhu [Thu, 9 Dec 2010 19:29:26 +0000 (11:29 -0800)]
Fix driver_bsd.c compile error
I got an error for WPA_KEY_RSC_LEN is not defined when compiling the
driver_bsd.c on NetBSD 4.0. Below patch fixed it.
Jouni Malinen [Thu, 30 Dec 2010 10:48:55 +0000 (12:48 +0200)]
P2P: Add initial support for driver-based P2P management
This adds partial callbacks and events to allow P2P management to be
implemented in a driver/firmware. This is not yet complete and is
very much subject to change in the future.
Jouni Malinen [Wed, 22 Dec 2010 09:33:59 +0000 (11:33 +0200)]
WPS: Add option to disable open networks by default
CONFIG_WPS_REG_DISABLE_OPEN=y can be used to configure wpa_supplicant
to disable open networks by default when wps_reg command is used to
learn the current AP settings. When this is enabled, there will be a
WPS-OPEN-NETWORK ctrl_iface event and the user will need to explicitly
enable the network (e.g., with "select_network <id>") to connect to
the open network.
Johannes Berg [Wed, 29 Dec 2010 12:05:34 +0000 (14:05 +0200)]
nl80211: Use driver-based off-channel TX if available
If the underlying driver supports off-channel TX, it will now be used by
the nl80211 driver wrapper, setting WPA_DRIVER_FLAGS_OFFCHANNEL_TX
accordingly.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Wed, 29 Dec 2010 11:59:17 +0000 (13:59 +0200)]
P2P: Add option for offloading off-channel TX to the driver
With the new kernel functionality coming to Linux to allow off-channel
TX, we can take advantage of that in the P2P code that currently uses
remain-on-channel. If a driver advertises support for it, it will be
asked to handle off-channel TX by itself.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Tue, 28 Dec 2010 15:15:01 +0000 (17:15 +0200)]
Allow AP mode to disconnect STAs based on low ACK condition
The nl80211 driver can report low ACK condition (in fact it reports
complete loss right now only). Use that, along with a config option, to
disconnect stations when the data connection is not working properly,
e.g., due to the STA having went outside the range of the AP. This is
disabled by default and can be enabled with disassoc_low_ack=1 in
hostapd or wpa_supplicant configuration file.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Jouni Malinen [Tue, 28 Dec 2010 10:09:14 +0000 (12:09 +0200)]
Re-initialize EAP ClientTimeout on for each session
ClientTimeout changes from EAP peer methods were not supposed to
change behavior for other EAP peer methods or even other sessions
of the same method. Re-initialize ClientTimeout whenever an EAP
peer method is initialized to avoid this. This addresses problems
where WPS (EAP-WSC) reduces the timeout and consecutive EAP runs
may fail due to too small timeout.
Fabien Marotte [Tue, 28 Dec 2010 09:48:58 +0000 (11:48 +0200)]
P2P: Limit the retransmission of GO Negotiation request to 120
If the peer you want to connect to is no longer available (does not
acknowledge frames) when wpa_supplicant sends GO Negotition Request
frames, retransmission of this frame is done until the associated
p2p_device structure is removed on timeout. In that case, no signal
is emitted to inform the GO Negotiation has failed.
When sending an Invitation Request frame, the same retransmission
mechanism is in place but limit the transmission to 100 and hitting
the limit generates an event.
This patch adds the same mechanism as the one in place for Invitation
Request, but with limit of 120 to match the existing wait_count for
for GO Negotiation.
Jouni Malinen [Tue, 28 Dec 2010 06:56:23 +0000 (08:56 +0200)]
WPS: Require PBC match with wps_pbc that specifies BSSID
The WPS mode was already verified when the AP was configured for
WPA/WPA2, but this was not done with AP that was in open mode.
Fix this by allowing wpa_supplicant_ssid_bss_match() to be called
in non-WPA configuration, too. With this change, wps_pbc BSSID
command will wait until the specified target AP is in active PBC
mode before trying to connect to it.
Jouni Malinen [Tue, 21 Dec 2010 10:48:53 +0000 (12:48 +0200)]
wlantest: Add more debug output for frame injection failures
Jouni Malinen [Tue, 21 Dec 2010 10:48:03 +0000 (12:48 +0200)]
wlantest: Fix management frame injection
The TDLS special case was supposed to apply to only Data frames.
Jouni Malinen [Mon, 20 Dec 2010 10:54:10 +0000 (12:54 +0200)]
WPS: Include all Config Methods in Probe Request
Do not use active PBC state to figure out which ConfigMethods are
included in Probe Request; instead, include all supported ones.
Jouni Malinen [Sun, 19 Dec 2010 10:44:58 +0000 (12:44 +0200)]
Fix CONFIG_SME build without CONFIG_IEEE80211W
Jouni Malinen [Sun, 19 Dec 2010 10:00:24 +0000 (12:00 +0200)]
nl80211: Remove extra \n from debug messages
Jouni Malinen [Sun, 19 Dec 2010 09:58:00 +0000 (11:58 +0200)]
Use SA Query procedure to recovery from AP/STA state mismatch
If a station received unprotected Deauthentication or Disassociation
frame with reason code 6 or 7 from the current AP, there may be a
mismatch in association state between the AP and STA. Verify whether
this is the case by using SA Query procedure. If not response is
received from the AP, deauthenticate.
This implementation is only for user space SME with
driver_nl80211.c.
Johannes Berg [Fri, 17 Dec 2010 16:34:16 +0000 (18:34 +0200)]
P2P: Allow access to group members
Some new code will require access to P2P group members, so add API to
retrieve the number of members and iterate the members themselves.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 17 Dec 2010 15:09:50 +0000 (17:09 +0200)]
P2P: Fix some int size warnings
When u64 != unsigned long, the compiler will give
some warnings. Fix these.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Dan Williams [Fri, 17 Dec 2010 13:56:01 +0000 (15:56 +0200)]
dbus: Emit property changed events when adding/removing BSSes
The supplicant was not emitting property changed events when the BSSs
property changed.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Johannes Berg [Fri, 17 Dec 2010 13:31:05 +0000 (15:31 +0200)]
Allow setting scan_res_handler from the callback function
Some new code I'm working on will need the scan_res_handler assigned all
the time in certain circumstances, so the easiest way is to reset it
within the handler. This is currently prevented by the way the code in
the event handler works -- change that to permit such usage.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Fri, 17 Dec 2010 13:20:32 +0000 (15:20 +0200)]
dbus: Fix type in wpa_dbus_dict_begin_string_array
The array's type should be given as the proper
DBUS_TYPE_STRING_AS_STRING, but evidently it
doesn't matter since it's all packed into a
variant type.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Sudhakar Swaminathan [Fri, 17 Dec 2010 13:06:48 +0000 (15:06 +0200)]
P2P: Cancel group formation timeout on p2p_cancel
Sudhakar Swaminathan [Fri, 17 Dec 2010 13:05:35 +0000 (15:05 +0200)]
P2P: Unauthorize pending P2P GO Neg peer on p2p_cancel
If there is a pending GO Negotiation when p2p_cancel is used,
unauthorize the peer to avoid immediate reconnection from being
accepted without a new p2p_connect command.
Sudhakar Swaminathan [Fri, 17 Dec 2010 13:04:14 +0000 (15:04 +0200)]
P2P: Cancel group formation on PBC overlap
We should cancel group formation completely on PBC overlap instead
of just partially notifying that operations were stopped. There is
no point in waiting for the group formation timeout in this case.
Masashi Honma [Fri, 17 Dec 2010 13:01:28 +0000 (15:01 +0200)]
P2P: Fix wpa_cli help typo
Masashi Honma [Fri, 17 Dec 2010 11:55:13 +0000 (13:55 +0200)]
nl80211: Stop driver init sooner if the interface does not exist
Jouni Malinen [Fri, 17 Dec 2010 11:49:38 +0000 (13:49 +0200)]
nl80211: Add forgotten deinit code on failure path
Jouni Malinen [Fri, 17 Dec 2010 11:07:32 +0000 (13:07 +0200)]
nl80211: Sync definitions with wireless-testing.git
Jouni Malinen [Fri, 17 Dec 2010 09:02:56 +0000 (11:02 +0200)]
wlantest: Fix buffer read overflow on CCMP encryption
The encryption code may write a full AES block to the end of the
buffer, so make sure the temporary buffer is long enough to fit that
data.
Jouni Malinen [Fri, 17 Dec 2010 06:26:39 +0000 (08:26 +0200)]
wlantest: Fix error path in TDLS-not-found case
Jouni Malinen [Fri, 17 Dec 2010 06:22:07 +0000 (08:22 +0200)]
wlantest: Avoid aliasing a function parameter by renaming local variable
Jouni Malinen [Fri, 17 Dec 2010 06:16:12 +0000 (08:16 +0200)]
wlantest: Remove unnecessary validation code
This condition is already checked above when figuring out whether a key
is known and as such, there is no point in keeping this check here.
Jouni Malinen [Fri, 17 Dec 2010 06:06:52 +0000 (08:06 +0200)]
wlantest: Replace pcap header directory
The use of the pcap subdirectory seems to be limited to some of the
newer Linux distros only, so use the older paths to pcap.h and
pcap-bpf.h to make wlantest bit more easier to compile on older
systems.
Jouni Malinen [Thu, 16 Dec 2010 17:08:49 +0000 (19:08 +0200)]
wlantest: Add counters and AP/direct path validation for TDLS
These can be used to write automated test scripts for verifying
that TDLS STAs are using correct data path.
Jouni Malinen [Thu, 16 Dec 2010 15:08:00 +0000 (17:08 +0200)]
wlantest: Check FTIE MIC in TDLS Teardown messages
Jouni Malinen [Thu, 16 Dec 2010 14:11:54 +0000 (16:11 +0200)]
wlantest: Add send command for injecting raw frames
This can be used by external programs (e.g., wlantest_cli) to inject
raw frames (hex dump of the frame header and body). The data can be
requested to be sent as-is or protected with the current key.
Jouni Malinen [Tue, 14 Dec 2010 15:10:39 +0000 (17:10 +0200)]
Removed unused variable from non-Linux builds
Jouni Malinen [Mon, 13 Dec 2010 19:08:53 +0000 (21:08 +0200)]
nl80211: Set cipher suites when using user space SME
Previously, pairwise and group cipher suites were configured only
when kernel SME (nl80211 connect API) was used. However, mac80211
needs this information even in the user space SME case for one
thing: to disable HT when TKIP/WEP is used. Add
NL80211_ATTR_CIPHER_SUITES_PAIRWISE to fix this special case with
user space SME. This allows mac80211 to disable HT properly when
the AP is configured with configuration that is not allowed.
Jouni Malinen [Mon, 13 Dec 2010 09:20:55 +0000 (11:20 +0200)]
wlantest: Add support for decrypting TDLS frames
Derive TPK based on TDLS TPK Handshake and decrypt frames on the
direct link with TPK-TK.
Jouni Malinen [Sun, 5 Dec 2010 04:31:22 +0000 (20:31 -0800)]
RSN IBSS: RX GTK configuration with nl80211
This add preliminary code for setting the per-STA RX GTK for
RSN IBSS when nl80211 drivers. For some reason, this does not
seem to fully work, but at least driver_nl80211.c is now aware of
what kind of key is being set and the whatever is missing from
making this key configuration go through should be specific to
nl80211/cfg80211.
Jouni Malinen [Sun, 5 Dec 2010 02:17:58 +0000 (18:17 -0800)]
nl80211: Generate EVENT_IBSS_RSN_START events
This is needed to trigger start of 4-way handshake when a new STA is
detected in an RSN IBSS.
Jouni Malinen [Sun, 5 Dec 2010 02:17:05 +0000 (18:17 -0800)]
IBSS RSN: Do not start 4-way handshake unless RSN is enabled
Jouni Malinen [Sun, 5 Dec 2010 01:40:36 +0000 (17:40 -0800)]
Do not send Deauth/Disassoc to unknown STA if SA is invalid
The frame needs to be sent from an individual (non-group) address,
so drop invalid frames before sending Deauth/Disassoc frames to
not associated STAs.
Paul Stewart [Sat, 4 Dec 2010 19:58:44 +0000 (11:58 -0800)]
dbus_new_handlers: Omit errant dbus_message_unref
This unref is guaranteed to be freeing a NULL pointer.
Tested manually: use dbus-send to send an invalid debug level parameter
Before change:
$ dbus-send --system --dest=fi.w1.wpa_supplicant1 --print-reply
/fi/w1/wpa_supplicant1 org.freedesktop.DBus.Properties.Set
string:fi.w1.wpa_supplicant1 string:DebugLevel variant:string:msgdumpf
Error org.freedesktop.DBus.Error.NoReply: Message did not receive a reply
(timeout by message bus)
(and then wpa_supplicant crashes)
After change:
$ dbus-send --system --dest=fi.w1.wpa_supplicant1 --print-reply
/fi/w1/wpa_supplicant1 org.freedesktop.DBus.Properties.Set
string:fi.w1.wpa_supplicant1 string:DebugLevel variant:string:msgdumpf
Error fi.w1.wpa_supplicant1.InvalidArgs: Did not receive correct message
arguments.
Signed-off-by: Paul Stewart <pstew@google.com>
Jouni Malinen [Sat, 4 Dec 2010 19:37:41 +0000 (11:37 -0800)]
Fix EAP-FAST PAC file writer to avoid crash with multiple PACs
One of the pointers to the PAC buffer was not updated after realloc
and if the realloc ended up returning new pointer, the *pos pointer
was still pointing at the old location (i.e., freed memory at
this point).
Jouni Malinen [Sat, 4 Dec 2010 19:18:21 +0000 (11:18 -0800)]
wlantest: Add support for reading DLT_IEEE802_11 pcap files
Jouni Malinen [Thu, 2 Dec 2010 20:56:37 +0000 (12:56 -0800)]
wlantest: Add support for reading pcap files with prism header
Jouni Malinen [Sat, 27 Nov 2010 11:05:37 +0000 (13:05 +0200)]
nl80211: Fix compiler warnings on non-P2P build
Ben Greear [Fri, 26 Nov 2010 19:46:30 +0000 (21:46 +0200)]
Enable sharing of scan result events among virtual interfaces
When controlling multiple virtual interfaces on the same physical
radio, share the scan results events with sibling interfaces. This
decreases the time it takes to connect many virtual interfaces.
This is currently only supported on Linux with cfg80211-based
drivers when using nl80211 or wext driver interface.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Ben Greear [Fri, 26 Nov 2010 19:16:36 +0000 (21:16 +0200)]
Add interface name to some debug prints
This makes it easier to figure out what is happening when controlling
multiple interfaces from a single wpa_supplicant process.
Tomasz Bursztyka [Fri, 26 Nov 2010 17:47:24 +0000 (19:47 +0200)]
dbus: Fix new dbus API for WPS
Start() method's optional Bssid argument needs a byte array, not an
array of arrays.
Jouni Malinen [Fri, 26 Nov 2010 16:14:51 +0000 (18:14 +0200)]
nl80211: Track used interfaces and support multiple P2P groups
Track all the P2P group interfaces within driver_nl80211.c to make
it easier to generate unique P2P Interface Addresses.
Jouni Malinen [Fri, 26 Nov 2010 15:41:21 +0000 (17:41 +0200)]
Allow driver wrappers to indicate whether result codes are sane
Some drivers are not providing exactly reliable error codes (e.g.,
with WEXT), but others may actually indicate reliable information.
Allow driver wrappers to indicate if that is the case and use
optimizations if so. For now, this improves nl80211 with
NL80211_CMD_CONNECT for a case where connection request fails.
Jouni Malinen [Fri, 26 Nov 2010 15:40:10 +0000 (17:40 +0200)]
nl80211: Add BSSID to NL80211_CMD_CONNECT assoc reject event
Jouni Malinen [Fri, 26 Nov 2010 15:39:31 +0000 (17:39 +0200)]
nl80211: Fix NL80211_CMD_CONNECT with WPA/WPS networks
Jouni Malinen [Fri, 26 Nov 2010 15:38:46 +0000 (17:38 +0200)]
Do not segfault on EVENT_ASSOC_REJECT without BSSID
Jouni Malinen [Fri, 26 Nov 2010 15:37:22 +0000 (17:37 +0200)]
SME: Optimize recovery from assocication command failures
mac80211 can indicate this mainly because of channel selection
conflicts with other vifs. If there is another BSS on another
channel, we should try to connect to it instead.
Jouni Malinen [Fri, 26 Nov 2010 13:54:53 +0000 (15:54 +0200)]
nl80211: Add preliminary code for testing separate P2P group interface
driver_param=use_p2p_group_interface=1 can now be used to test
nl80211-drivers with separate P2P group interface. In other words,
the main interface (e.g., wlan0) is reserved for P2P management
operations and non-P2P connections and a new group interface (e.g.,
p2p-wlan0-0) is created for the P2P group.
This implementation is very minimal, i.e., it only support address
allocation for a single P2P group interface (if the driver does not
handle this internally). In addition, not all functionality has yet
been tested, so for now, this is disabled by default and needs that
special driver_param to enable.
Jouni Malinen [Fri, 26 Nov 2010 13:52:16 +0000 (15:52 +0200)]
P2P: Add new driver option for interface allocation
WPA_DRIVER_FLAGS_P2P_MGMT_AND_NON_P2P flag can now be used to
indicate that the initial interface (e.g., wlan0) is used for
P2P management operations and potentially non-P2P connections.
This is otherwise identical to
WPA_DRIVER_FLAGS_P2P_DEDICATED_INTERFACE, but the possibility of
non-P2P connections makes some operations differ.
Jouni Malinen [Fri, 26 Nov 2010 13:50:22 +0000 (15:50 +0200)]
P2P: Rename the group interface name to use p2p- prefix
This may make it less likely for udev to rename the interface that
would previously have been called wlan0-p2p-# (now: p2p-wlan0-#).
In addition, add some workaround code to handle the case where the
main interface name is close to the IFNAMSIZ length limit to
avoid going over that for the P2P group interface.
Jouni Malinen [Fri, 26 Nov 2010 13:49:26 +0000 (15:49 +0200)]
P2P: Use larger pending_interface_name buffer
In theory, the interface name could be longer than IFNAMSIZ in
some systems, so use the same size buffer for this field as is
used with the main interface name.
Jouni Malinen [Fri, 26 Nov 2010 13:47:13 +0000 (15:47 +0200)]
P2P: Use alternative way of starting dnsmasq if needed
Some other dnsmasq users (like libvirt) seem to be binding the DHCP
server to all interfaces which prevents the previously used mechanism
here from working (bind on the DHCP socket fails). If a failure is
noticed, try to start dnsmasq with -z option to avoid that.
Jouni Malinen [Fri, 26 Nov 2010 09:36:03 +0000 (11:36 +0200)]
Extend load balancing optimization in BSS blacklisting
Move the previously SME specific optimization code into generic
function that can be used from non-SME code, too, and use it to
handle disconnection events. In other words, allow disconnection
event to trigger similar optimized scanning case to handle a
common load balancing mechanism. If there is another BSS in the
same ESS when we receive a disconnection event, scan only the
known frequencies of such other BSSes on the next attempt to
speed up recovery.
Jouni Malinen [Fri, 26 Nov 2010 09:23:50 +0000 (11:23 +0200)]
Blacklist BSS on first failure if only a single network is enabled
The special case of requiring blacklisting count to be 2 or higher
is only needed when more than a single network is currently enabled.
As such, we should not do that when only a single network is enabled.
This make the station more likely to follow network side load
balancing attempts where the current AP may disassociate us with
an assumption that we would move to another AP.
Jouni Malinen [Thu, 25 Nov 2010 21:41:32 +0000 (23:41 +0200)]
Fix CONFIG_AP=y build without NEED_AP_MLME driver
Jouni Malinen [Thu, 25 Nov 2010 21:34:56 +0000 (23:34 +0200)]
Fix CONFIG_AP=y build without CONFIG_WPS=y
Jouni Malinen [Thu, 25 Nov 2010 21:32:17 +0000 (23:32 +0200)]
random: Fix a compiler warning about unused variable
In CONFIG_NO_STDOUT_DEBUG=y case, the error variable was not used.
Jouni Malinen [Thu, 25 Nov 2010 20:51:56 +0000 (22:51 +0200)]
SME: Optimize recovery from common load balancing mechanisms
When authentication or association fails when trying to connect to
a BSS in an ESS that has multiple BSSes based on previous scans,
limit the first recovery scan to only the known channels that has
been seen previously. This speeds up recovery in some of the most
commonly used load balancing mechanisms in enterprise WLAN
networks.