Commit Graph

1186 Commits

Author SHA1 Message Date
Jouni Malinen b22128efdc P2P: Add initial version of P2P Module 2010-09-09 07:17:17 -07:00
Jouni Malinen c2af2afb3b P2P: Preparations for adding P2P IE into Beacon/Probe Response frames 2010-09-09 07:17:17 -07:00
Jouni Malinen b305c684b8 P2P: Save a copy of P2P IE(s) data from (Re)Association Request 2010-09-09 07:17:17 -07:00
Jouni Malinen 046b26a24e nl80211: Add P2P operations 2010-09-09 07:17:17 -07:00
Jouni Malinen 2883205ec8 driver_test: Add functionality for allowing P2P testing 2010-09-09 07:17:17 -07:00
Jouni Malinen 75bde05d53 P2P: Add driver operations for P2P use 2010-09-09 07:17:16 -07:00
Jouni Malinen 62281bc690 P2P: Do no process Probe Request with P2P wildcard SSID in WPS
The Probe Request frames used in P2P Device Discovery should not be
processed by the WPS implementation.
2010-09-09 07:17:16 -07:00
Jouni Malinen 935a948f97 P2P: Enable use of WPS Requested Device Type without WPS 2.0 2010-09-09 07:17:16 -07:00
Jouni Malinen 63675def6e P2P: Add Device Name into WPS IE in Probe Request frames 2010-09-09 07:17:16 -07:00
Jouni Malinen 91a9464528 Make IEEE 802.11 IE parser aware of P2P IE
This does not handle fragmented IEs and is only used to check quickly
whether the IE blob includes any P2P IE(s).
2010-09-09 07:17:16 -07:00
Jouni Malinen dd6cc5a20c P2P: Wi-Fi Direct frame format definitions 2010-09-09 07:17:16 -07:00
Jouni Malinen fdc9eeb175 WPS 2.0: Convert new attributes into WFA vendor extension
The WSC 2.0 specification moved to use another design for the new
attributes to avoid backwards compatibility issues with some
deployed implementations.
2010-09-09 06:07:49 -07:00
Jouni Malinen ac4dcaf7bf WPS 2.0: Fix strict mode validation of UPnP MAC Address format
This was supposed to only reject the message from WPS 2.0 ER, not from
WPS 1.0 ER.
2010-09-09 06:07:49 -07:00
Jouni Malinen 42f50264c0 WPS: Make fragment size configurable for EAP-WSC peer
"wpa_cli set wps_fragment_size <val>" can now be used to configure the
fragment size limit for EAP-WSC.
2010-09-09 06:07:49 -07:00
Jouni Malinen ecece754db WPS: Add more debug prints for authorized MACs operations 2010-09-09 06:07:49 -07:00
Jouni Malinen 498cdee0c7 WPS ER: Use PBC overlap detection
ER should follow same rules as internal Registrar in an AP for
session overlap detection.
2010-09-09 06:07:49 -07:00
Jouni Malinen 6a4477236e WPS 2.0: Only reject Probe Request frames from WPS 2.0 devices 2010-09-09 06:07:49 -07:00
Jouni Malinen e69b86b71d WPS 2.0: By default, use strict validation reject only with WPS 2.0 2010-09-09 06:07:49 -07:00
Jouni Malinen 5fabd9fefb WPS: Fix strict validation to mandate Network Index attribute
While this attribute is is now deprecated, it is still required
for backwards compatibility. Better check this if strict validation
is enabled.
2010-09-09 06:07:49 -07:00
Jouni Malinen e6e25d37a3 WPS 2.0: Use strict validation of NewWLANEventMAC only with WPS 2.0
This avoids some testing issues with WPS 1.0 implementations while
maintaining strict validation for WPS 2.0 implementations.
2010-09-09 06:07:49 -07:00
Jouni Malinen b68ccf4048 WPS ER: Do not use SetSelectedRegistrar when learning/configuring AP 2010-09-09 06:07:49 -07:00
Jouni Malinen ad4741183f WPS 2.0: Make sure PHY/VIRT flag gets set for PBC 2010-09-09 06:07:48 -07:00
Jouni Malinen 168f840169 WPS 2.0: Add strict validation of SetSelectedRegistrar attributes 2010-09-09 06:07:48 -07:00
Jouni Malinen 545ee4fd3d WPS 2.0: Add wildcard AuthorizedMACs if Enrollee address is not known 2010-09-09 06:07:48 -07:00
Jouni Malinen 53587ec183 WPS 2.0: Make WSC 2.0 support to be build option (CONFIG_WPS2)
For now, the default build will only include WSC 1.0 support.
CONFIG_WPS2=y can be used to add support for WSC 2.0.
2010-09-09 06:07:48 -07:00
Jouni Malinen c15a854aec WPS 2.0: Add tool for testing protocol extensibility
This is disabled by default and can be enabled by defining
CONFIG_WPS_EXTENSIBILITY_TESTING.
2010-09-09 06:07:48 -07:00
Jouni Malinen 4a34969824 WPS: Add a test mechanism for adding an extra credential into M8
This can be used to build a test version of ER that adds an extra
Credential attribute into M8.
2010-09-09 06:07:48 -07:00
Jouni Malinen 54f489be45 WPS 2.0: Validate WPS attributes in management frames and WSC messages
If CONFIG_WPS_STRICT is set, validate WPS IE(s) in management frames and
reject the frames if any of the mandatory attributes is missing or if an
included attribute uses an invalid value. In addition, verify that all
mandatory attributes are included and have valid values in the WSC
messages.
2010-09-09 06:07:48 -07:00
Jouni Malinen 00ae50bc87 atheros: Use larger buffer for WSC IE changes
This resolves issues in updating Beacon/Probe Response frame IEs
in a case where the value may be long enough to get fragmented
into multiple IEs.
2010-09-09 06:07:48 -07:00
Jouni Malinen ed1c1ebfb4 WPS 2.0: Ignore WEP Credentials as station Enrollee
Ignore Credential if it is for a WEP network. Reject the message if
no valid Credential is found.
2010-09-09 06:07:48 -07:00
Jouni Malinen 6be2d7f826 WPS 2.0: Enforce new security policy of received AP Settings
When receiving new AP Settings from ER, reject WEP configuration
and upgrade WPA-Personal/TKIP only to mixed mode (i.e., add
WPA2-Personal/CCMP).
2010-09-09 06:07:48 -07:00
Jouni Malinen 6b633b4da7 WPS 2.0: Fix Probe Request WPS IE building to be able to fragment data
If all the device information attributes use their maximum lengths,
a single WPS IE is not enough to fit in all the data and as such,
we must be able to fragment the data. In addition, the wpabuf needs
to be allocated larger to fit in maximum data.
2010-09-09 06:07:47 -07:00
Jouni Malinen dcc4d8be75 WPS 2.0: Disable WPS workarounds if CONFIG_WPS_STRICT is defined 2010-09-09 06:07:47 -07:00
Jouni Malinen 5314d652d4 WPS 2.0: Modify empty-string workaround to meet 2.0 rules
Instead of using 0x00 as the extra character, use space (' ') to
avoid failing tests that verify that the variable length string
attributes are not null terminated. In addition, this workaround
can now be disabled by defining CONFIG_WPS_STRICT for the build.
This can be done by adding following line to .config:
CFLAGS += -DCONFIG_WPS_STRICT

However, it should be noted that such a build may not interoperate
with some deployed WPS 1.0 -based implementations and as such, is
mainly designed for testing.
2010-09-09 06:07:47 -07:00
Jouni Malinen 6a857074f4 WPS 2.0: Add virtual/physical display and pushbutton config methods 2010-09-09 06:07:47 -07:00
Jouni Malinen 662bd57522 WPS 2.0: Add device attributes into Probe Request
Add Manufacturer, Model Name, Model Number, and Device Name attributes
into the WSC IE in the Probe Request frames.
2010-09-09 06:07:47 -07:00
Jouni Malinen cfe1c3f1ef WPS 2.0: Add Request to Enroll attribute into Probe Request
Whenever wpa_supplication is using Request Type Enrollee, it is trying
to enroll into a network. Indicate this with the explicit inclusion of
Request to Enroll attribute with value TRUE.
2010-09-09 06:07:47 -07:00
Jouni Malinen 31fcea931d WPS 2.0: Add support for AuthorizedMACs attribute
Advertize list of authorized enrollee MAC addresses in Beacon and
Probe Response frames and use these when selecting the AP. In order
to provide the list, the enrollee MAC address should be specified
whenever adding a new PIN. In addition, add UUID-R into
SetSelectedRegistrar action to make it potentially easier for an AP
to figure out which ER sent the action should there be multiple ERs
using the same IP address.
2010-09-09 06:07:47 -07:00
Jouni Malinen f439079e93 WPS 2.0: Add new attributes and update version negotiation
This adds definitions and parsing of the new attributes that were added
in WPS 2.0. In addition, the version negotiation is updated to use the
new mechanism, i.e., accept everything received and use the new Version2
attribute in transmitted messages.
2010-09-09 06:07:47 -07:00
Jouni Malinen a0fad21014 Indicate Barker Preamble Mode in ERP IE also based on local configuration
While this is not strictly speaking required based on dynamic
configuration (i.e., dot11ShortPreambleOptionImplemented is static
value based on implementation, not runtime configuration), it is better
to follow local configuration parameter for short preamble in addition
to the associated station capabilities.
2010-09-05 13:11:42 +03:00
Jouni Malinen 702934a163 atheros: Fix driver deinit function to be run
hostapd uses hapd_deinit(), not deinit() wpa_driver_ops.
2010-09-05 13:04:03 +03:00
Jouni Malinen 4a46e82fb4 atheros: Deinit l2_packet sock_xmit on error path 2010-09-05 13:03:26 +03:00
Jouni Malinen 8421e95c71 Fix segfault in hostapd_eid_ht_capabilities() with some drivers
This function is not really needed in case of drivers that build the
HT IEs internally. However, since this can get called if ieee80211n=1
is set in hostapd.conf, we better not segfault even if the driver
does not provide hw info (hapd->iface->current_mode == NULL).
2010-09-05 12:47:16 +03:00
Jouni Malinen 0caf077bc1 WPS: Fix hostapd build without CONFIG_WPS_UPNP
Commit 5a1cc30f1a added code that was
assuming CONFIG_WPS_UPNP is enabled whenever CONFIG_WPS is. Fix this
by making the UPnP calls conditional on CONFIG_WPS_UPNP define.
2010-09-05 12:34:04 +03:00
Jouni Malinen cce1f698e5 WPS: Use more defensive design to avoid theoretical NULL deref
Prior to commit 6195adda9b the sm->user
dereference did not exist here. While this is in practice non-NULL,
better use more defensive construction here to avoid NULL pointer
dereference should this ever change.
2010-09-04 21:37:36 +03:00
Jouni Malinen 0c80427d77 NDIS: Fix association for WPS provisioning with protected AP
Some NDIS drivers require a workaround to allow them to associate
with a WPS AP that is already using protection (Privacy field = 1).
Let driver_ndis.c know if the AP is already using Privacy and if so,
configure a dummy WEP key to force the driver to associate.
2010-09-04 13:56:12 +03:00
Jouni Malinen f4e5fd948a l2_packet_ndis: Fix overlapped write not to corrupt stack
When using overlapped write, we must have the provided memory
areas available during the operation and cannot just use stack
unless we wait for the completion within the function. In the case
of TX here, we can easily wait for the completion since it is likely
to happen immediately. In addition, this provides more reliable
success/failure return value for l2_packet_send(). [Bug 328]
2010-09-02 13:23:14 +03:00
Helmut Schaa 36af1c7d31 hostapd: enable STBC only for STBC capable STAs
hostapd simply used its own STBC configuration in the STA's HT caps. This
resulted in TX STBC being used for STAs not supporting RX STBC, which in
turn resulted in the STA not receiving anything.

Fix this by handling the STBC flags in the same way mac80211 does. Mask
out RX STBC if we don't support TX STBC and vice versa.

Tested only with the nl80211 driver and a STBC incapable STA.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
2010-08-28 12:25:44 +03:00
Masashi Honma 60da5e0f3f Solaris: Add support for wired IEEE 802.1X client
This patch adds support for wired IEEE 802.1X client on the Solaris.

I have tested with these:
OS : OpenSolaris 2009.06
EAP : EAP-MD5
Switch : Cisco Catalyst 2950
2010-08-28 11:40:07 +03:00
Jouni Malinen 60a972a68d Add current signal strength into signal quality change events 2010-08-27 16:58:06 +03:00