Jouni Malinen [Thu, 17 Mar 2011 16:03:20 +0000 (18:03 +0200)]
WPS: Fix active PBC session removal to ignore MAC address
Use only the UUID-E to remove active PBC session(s) at the completion of
successful PBC protocol run. This fixes potential issues with Enrollees
that use multiple MAC addresses and as such, can get multiple entries in
the PBC session list.
Catalin Drula [Wed, 16 Mar 2011 10:30:09 +0000 (12:30 +0200)]
dbus: Fix interface list getter with multiple interfaces
There's a bug in the getter for the 'Interfaces' property
of /fi/w1/wpa_supplicant1 (new D-Bus interface) which causes a
'Segmentation Fault' when there are multiple interfaces.
Helmut Schaa [Wed, 16 Mar 2011 09:56:39 +0000 (11:56 +0200)]
hostapd: Don't force HT Mixed Mode for non-GF STAs
Currently hostapd will force HT Mixed Mode if at least one non-GF STA is
associated. This will force _all_ HT transmissions to be protected.
802.11n-2009 doesn't require HT Mixed Mode to be used in case of non-GF
STAs but instead the HT information element contains a flag if non-GF
STAs are present. All STAs are required to protect GF transmissions in
that case. Hence, setting HT Mixed mode if non-GF STAs are present is
superfluous.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Chao-Wen Yang [Thu, 10 Mar 2011 16:59:51 +0000 (18:59 +0200)]
WPS: Indicate PBC session overlap in wps_pbc return value
Use a specific return value, WPS-PBC-OVERLAP, to indicate a reason
for rejecting a wps_pbc command in wpa_supplicant AP mode if the
PBC mode cannot be started due to PBC session overlap having been
detected during monitor time.
Jouni Malinen [Thu, 10 Mar 2011 16:51:00 +0000 (18:51 +0200)]
WPS: Ignore PBC session overlap if a specific Enrollee is selected
This allows the user to complete WPS provisioning using PBC by
selected a specific Enrollee even if there are other Enrollees
in active PBC mode at the same time. The other Enrollees will be
rejected should they try to connect at the same time.
Jouni Malinen [Thu, 10 Mar 2011 16:40:16 +0000 (18:40 +0200)]
wpa_supplicant AP: Copy generated UUID for AP configuration
If the wpa_supplicant configuration file does not specify an UUID,
we need to copy the generated UUID, not the all zeros buffer
reserved for the configured UUID.
Jouni Malinen [Thu, 10 Mar 2011 16:36:07 +0000 (18:36 +0200)]
WPS: Copy UUID from the first interface
Instead of generating a different UUID for each interface, use the
same UUID that was either configured of generated for the first
interface. This avoids potential issues with PBC session overlap
detection should multiple interfaces end up running a PBC scan
at the same time which may happen at least in some P2P use cases.
Jouni Malinen [Thu, 10 Mar 2011 16:33:53 +0000 (18:33 +0200)]
WPS: Use only UUID-E in PBC session overlap detection on Registrar
Ignore possible mismatches in the source address of the frame and only
use UUID-E to check whether a Probe Request or M1 is from the same
Enrollee when figuring out whether there is PBC session overlap. This
is needed to avoid potential issues with Enrollee devices that may have
multiple interfaces indicating active PBC state.
Jouni Malinen [Thu, 27 Jan 2011 23:24:24 +0000 (01:24 +0200)]
TDLS: Allow wpa_cli tdls_setup to start renegotiation
If there is already a link the requested peer, request start of
renegotiation instead of completely new link. This seems to be needed
to allow some driver to accept the trigger for a new negotiation.
Jouni Malinen [Thu, 27 Jan 2011 19:10:05 +0000 (21:10 +0200)]
TDLS: Add testing code for concurrent initiation
tdls_testing 0x80 can now be used to request wpa_supplicant to send
a TDLS Setup Request frame (i.e., try to initiate TDLS setup)
whenever a TDLS Setup Request frame has been received from a peer.
Jouni Malinen [Thu, 27 Jan 2011 12:06:17 +0000 (14:06 +0200)]
TDLS: Replace os_memset() of all peer data with safer approach
Blindly clearing all struct wpa_tdls_peer members is a risky
operation since it could easily clear pointers to allocated
memory, etc. information that really should not be removed.
Instead of hoping that new code gets added here to restore
the important variables, reverse the approach and only clear
structure members one by one when needed.
Jouni Malinen [Wed, 26 Jan 2011 14:09:10 +0000 (16:09 +0200)]
TDLS: Allow unencrypted network negotiation through wpa_supplicant
This allows the same code path to be used for both protected and
unprotected configurations to limit need for duplicated code in
both the driver and wpa_supplicant.
Jouni Malinen [Mon, 24 Jan 2011 19:36:20 +0000 (21:36 +0200)]
TDLS: Clean up and fix Key Lifetime processing
This adds code for validating that the same Key Lifetime is used
throughout TPK handshake and enables TPK lifetime expiration and
renewal/teardown. These part seem to be working, but the actual
handling of TDLS Setup Confirm and renewal are not fully
functional yet.
Jouni Malinen [Mon, 24 Jan 2011 15:45:28 +0000 (17:45 +0200)]
TDLS: Add new testing modes for TPK lifetime testing
tdls_testing bits:
bit 3 = use short TPK lifetime (301 seconds)
bit 4 = use wrong TPK lifetime in TDLS Setup Response
bit 5 = use wrong TPK lifetime in TDLS Setup Confirm
Jouni Malinen [Fri, 14 Jan 2011 19:26:25 +0000 (21:26 +0200)]
TDLS: Add a special testing feature for changing TDLS behavior
These special test cases can be configured at run time with "wpa_cli
tdls_testing <value>" where <value> is an integer (either as a decimal
or as a hex value with 0x prefix) bitmap of special features with
following bits available at this point:
bit 0 = long frame (add dummy subelement to make FTIE very long)
bit 1 = use alternative RSN IE (different RSN capab value and no extra
replay counters)
bit 2 = send incorrect BSSID in Link Identifier of TDLS Setup Request
(e.g., 1 = long FTIE, 2 = different RSN IE, 3 = both of those)
This is disabled by default and can be enabled for the build by
adding the following line to .config:
CFLAGS += -DCONFIG_TDLS_TESTING
Shan Palanisamy [Mon, 25 Oct 2010 10:50:34 +0000 (13:50 +0300)]
Indicate assoc vs. reassoc in association event
This allows driver wrappers to indicate whether the association was
done using Association Request/Response or with Reassociation
Request/Response frames.
Jouni Malinen [Thu, 27 Jan 2011 11:59:00 +0000 (13:59 +0200)]
Add defines for Valgrind client requests
CFLAGS += -DCONFIG_VALGRIND can now be used to enable support for
Valgrind client requests to help in removing some non-issues from
Valgrind reports. This is mainly aimed at allowing unknown ioctl
results to be marked as defined data.
Jouni Malinen [Thu, 27 Jan 2011 12:02:03 +0000 (14:02 +0200)]
eloop: Fix integer overflow in long timeouts
If the os_time_t variable used for the expiration time (seconds)
overflows when the registered timeout value is being added,
assume that the event would happen after an infinite time, i.e.,
would not really happen in practice. This fixes issues with
long key timeouts getting converted to immediate expiration due
to the overflow.
Iain Hibbert [Sun, 27 Feb 2011 16:59:26 +0000 (18:59 +0200)]
Avoid preprocessor directives in macro arguments
os_snprintf() can be a preprocessor macro and according to
C99 (6.10.3 clause 11) the results of having preprocessor directives
inside the macro arguments is undefined.
Jouni Malinen [Sun, 27 Feb 2011 10:55:00 +0000 (12:55 +0200)]
Remove Host AP driver FAQ from the git repository
There is no need to keep this in hostap.git with wpa_supplicant
and hostapd. The CVS version from 0.5.x branch is identical and
it can be used instead.
Johannes Berg [Thu, 24 Feb 2011 20:05:22 +0000 (22:05 +0200)]
P2P: Add p2p_get_peer_found to get peer info
This will only retrieve information about peers that have been fully
discovered, not peers that are only half-discovered based on their Probe
Request frames.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg [Thu, 24 Feb 2011 19:59:58 +0000 (21:59 +0200)]
P2P: Add new_device flag to dev_found callback
The DBus code will want to have perfect matching of dev_found and the
dev_lost it adds so it doesn't need to keep track internally. Enable
that with a new flag in the core that tracks whether we have already
notified about this -- the existing users can ignore it.
The part where this is always set to 1 if the new device is discovered
by a driver that has P2P in the driver is buggy -- the driver should
feed the P2P peer database and then that should feed the notification
here instead.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Helmut Schaa [Thu, 24 Feb 2011 19:25:40 +0000 (21:25 +0200)]
hostapd: Inherit correct MAC address for AP VLAN interfaces
When using multiple vifs and dynamic vlan tagging is enabled on any
interface, the created AP VLAN interfaces get the BSSID of the first
AP mode interface instead of the BSSID of the corresponding AP mode
interface.
Example:
wlan0 - xx:xx:xx:xx:x0
wlan1 - xx:xx:xx:xx:x1
Assume a STA connects to the AP interface wlan1 and gets a dynamic
VLAN tag 100 assigned by the RADIUS server. Hostapd will create an AP
VLAN interface wlan1.100 but doesn't set an address for this interface
which results in wlan1.100 getting the same address as wlan0:
wlan1.100 - xx:xx:xx:xx:x0
As a result the STA that was moved to wlan1.100 isn't able to finish its
4-way handshake since mac80211 won't pass its frames to wlan1.100 due to
the different address.
To fix this issue make use of the address of the AP interface when
creating an AP VLAN interface.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Jouni Malinen [Thu, 24 Feb 2011 19:13:30 +0000 (21:13 +0200)]
P2P: Handle P2P-not-supported without segfaults
Previous code was assuming that the P2P module is always initialized.
However, that is not the case anymore with drivers that do not support
P2P. Add verification of whether P2P is enabled before trying to execute
P2P commands.