Commit graph

784 commits

Author SHA1 Message Date
Jouni Malinen
143980694f Preparations for 0.6.9 release 2009-03-23 16:42:45 +02:00
Jouni Malinen
5ce2a4649d driver_madwifi: Fix build with old driver versions
Do not reference ie.rsn_ie in wpa_hexdump outside #ifdef MADWIFI_NG.
[Bug 302]
2009-03-22 15:54:26 +02:00
Jouni Malinen
75864b7f63 Fix UNIX domain socket address handling to be more portable
Remove all fields before sun_path before printing or comparing sun_path
contents. Using offsetof should be portable. In addition, set sun_len
for FreeBSD.
2009-03-21 22:07:14 +02:00
Sam Leffler
19b9436c0e Fix UNIX domain socket address handling to be more portable
Removing just sun_family is not portable since some systems (e.g.,
FreeBSD) include an additional sun_len field. Using offsetof should be
portable. In addition, set sun_ken for FreeBSD.
2009-03-21 22:00:27 +02:00
Jouni Malinen
22498d6dc3 Fix WPS UPnP build for FreeBSD 2009-03-21 21:00:37 +02:00
Jouni Malinen
7d737d6bf9 Fix FreeBSD build by not adding -ldl
Unlike Linux, FreeBSD does not use libdl.
2009-03-21 20:59:07 +02:00
Jouni Malinen
4df91b3f3f Fix driver_bsd.c build for FreeBSD 2009-03-21 20:58:27 +02:00
Jouni Malinen
26c9d7ea24 Fix IEEE 802.11r build without CONFIG_CLIENT_MLME 2009-03-21 20:57:21 +02:00
Jouni Malinen
8104763131 Fix CONFIG_DRIVER_RADIUS_ACL=y build 2009-03-21 20:56:39 +02:00
Jouni Malinen
fd05d64ecf nl80211: Make get_ssid behave like get_bssid with SME
Use a local copy of SSID instead of WEXT when using wpa_supplicant-based
SME.
2009-03-20 23:03:18 +02:00
Jouni Malinen
ed384c2c67 nl80211: Make set_bssid() WEXT_COMPAT 2009-03-20 22:59:17 +02:00
Jouni Malinen
95f02a5ddd nl80211: Make PMKSA caching candidate event WEXT_COMPAT 2009-03-20 22:57:46 +02:00
Jouni Malinen
f555b6dec1 nl80211: Mark PMKSA cache operations with WEXT_COMPAT
These are not needed with wpa_supplicant SME.
2009-03-20 22:55:24 +02:00
Jouni Malinen
af723760ba nl80211: Fix no-WEXT_COMPAT build
wpa_driver_nl80211_set_ssid() and wpa_driver_nl80211_set_freq() are only
for WEXT_COMPAT now that the user space MLME code is removed.
2009-03-20 22:44:53 +02:00
Jouni Malinen
c9d2ffbc4c Document CONFIG_CLIENT_MLME option as specific to test driver
Since user space MLME is not used with nl80211 anymore, this option is
only of use with driver_test.
2009-03-20 22:35:19 +02:00
Jouni Malinen
625f587b03 nl80211: Remove user space MLME code
This design did not make it into the kernel and the new user space SME
design has removed the need for keeping the experimental code.
2009-03-20 22:31:24 +02:00
Jouni Malinen
c2a0407851 Add SME support (separate authentication and association)
This can be used, e.g., with mac80211-based Linux drivers with
nl80211. This allows over-the-air FT protocol to be used (IEEE
802.11r).

Since the nl80211 interface needed for this is very recent (added
today  into wireless-testing.git), driver_nl80211.c has backwards
compatibility code that uses WEXT for association if the kernel does
not support the new commands. This compatibility code can be
disabled by defining NO_WEXT_COMPAT. That code will also be removed
at  some point to clean up driver_nl80211.c.
2009-03-20 22:26:41 +02:00
Jouni Malinen
b21fab69fd Update linux/nl80211.h copy based on wireless-testing.git 2009-03-20 21:28:34 +02:00
Jouni Malinen
9f98c48315 Fix doxygen function comment 2009-03-19 21:42:15 +02:00
Jouni Malinen
aca77fe3fc Add link to mac80211 driver information 2009-03-19 20:32:45 +02:00
Jouni Malinen
4cb0dcd92d Fix IEEE 802.11r key derivation function to match with the standard
IEEE Std 802.11r-2008, 8.5.1.5.2 starts the 'i' counter from 1, not 0.
Note: this breaks interoperability with previous versions. [Bug 303]
2009-03-19 15:46:00 +02:00
Jouni Malinen
c5aaa01562 Detach ctrl_iface monitor if the client socket is removed
No need to wait for 10 errors when using UNIX domain socket; we can
detach the client immediately on ENOENT.
2009-03-17 16:56:30 +02:00
Masashi Honma
2943799678 TNC: Fix a stray pointer that could cause segfault on error path
On "eap_tnc_process" function error case, data->in_buf keeps reference
to a local scope variable. For example this will cause segmentation
fault in "eap_tnc_deinit" function "wpabuf_free(data->in_buf)"
statement.
2009-03-16 21:01:07 +02:00
Jouni Malinen
c590cb67d4 Update draft-cam-winget-eap-fast-provisioning references to RFC 5422 2009-03-14 10:30:14 +02:00
Kel Modderman
bffc384cbf hostapd: Fix some manual page formatting
lintian (Debian package lint tool) found some small deficiencies in
hostapd.8 and hostapd_cli.1.
2009-03-13 20:49:01 +02:00
Jouni Malinen
51853c899b Fix TNC with EAP-TTLS
This was broken by 510c02d4a3 which added
validation of eap_ttls_phase2_eap_init() return value. The main problem
in the code trying to initialize a new phase 2 EAP method
unconditionally; this should only happen if there is a new method in the
inner method sequence.
2009-03-13 18:20:59 +02:00
Jouni Malinen
99bff8430f Fix segmentation fault on EAP-TTLS phase 2 EAP method init failure
This is based on a patch and report by Masashi Honma
<honma@ictec.co.jp>. The issue is more generic than just TNC, though,
since failure to initialize any phase 2 EAP method can result in NULL
dereference.
2009-03-13 17:53:13 +02:00
Masashi Honma
0d308bc074 TNC: Send EAP-Failure on TNC failure
On PEAP(TNC), hostapd integrated RADIUS server doesn't return
EAP-Failure when "Recommendation = none". So, EAP data retransmittion
occurs.

My co-worker "Ryuji Ohba" made below patch.
2009-03-13 17:41:58 +02:00
Larry Stefani
b7d3a95afc Zero struct ifreq data before use in l2_packet_init()
[Bug 300]
2009-03-13 17:04:33 +02:00
Jouni Malinen
90ac1f9fc9 Allow more complex BSSID masks to be used for multi-BSSID
If every secondary BSS is configured with a pre-set BSSID, hostapd does
not enforce the BSSID mask requirements anymore, i.e., they are used
only if hostapd is responsible for generating MAC addresses for virtual
interfaces.
2009-03-12 22:01:26 +02:00
Jouni Malinen
eb1f7446b5 Move DTIM period configuration into Beacon set operation
This is needed to make mac80211 work with multi-BSS configuration. The
previous design ended up setting DTIM period for secondary BSSes before
setting the Beacon and driver_nl80211.c was not really prepared for
that. Eventually, the Beacon configuration routines should be combined
into a single driver operation, but for now, just moving this call is
the simplest workaround.
2009-03-12 21:57:08 +02:00
Jouni Malinen
816bce98e1 nl80211: Add per-BSS data structure and enable BSS add/remove
This allows mac80211 to be used for multi-BSSID operations.
2009-03-12 21:55:42 +02:00
Jouni Malinen
86f4deb635 FT: Fix status code values to match with IEEE 802.11r-2007
It looks like couple of status code values were changed during the
802.11r draft process and these were not updated in source code yet.
2009-03-09 22:28:30 +02:00
Jouni Malinen
f238cf9f42 FT: Add RIC Request processing and RIC Response generation
hostapd will now go through the RIC Request and process each RDIE. Only
WMM TSPEC requests are currently supported; all other request
descriptors will be declined.

RIC Response is written by hostapd and verified by wpa_supplicant (MIC
validation). wpa_supplicant does not yet have code to notify the driver
about the resource request results.
2009-03-09 22:25:58 +02:00
Jouni Malinen
babfbf15cc FT: Add RIC Request generation and validation (but not processing)
This adds first part of FT resource request as part of Reassocition
Request frame (i.e., FT Protocol, not FT Resource Request Protocol).
wpa_supplicant can generate a test resource request when driver_test.c
is used with internal MLME code and hostapd can verify the FTIE MIC
properly with the included RIC Request.

The actual RIC Request IEs are not processed yet and hostapd does not
yet reply with RIC Response (nor would wpa_supplicant be able to
validate the FTIE MIC for a frame with RIC Response).
2009-03-09 20:45:17 +02:00
Jouni Malinen
143a4bf632 WPS: Add a workaround for static WEP with Windows network probe
Windows XP and Vista clients can get confused about EAP-Identity/Request
when they probe the network with EAPOL-Start. In such a case, they may
assume the network is using IEEE 802.1X and prompt user for a
certificate while the correct (non-WPS) behavior would be to ask for the
static WEP key. As a workaround, use Microsoft Provisioning IE to
advertise that legacy 802.1X is not supported.

This seems to make Windows ask for a static WEP key when adding a new
network, but at least Windows XP SP3 was still marking IEEE 802.1X
enabled for the network. Anyway, this is better than just leaving the
network configured with IEEE 802.1X and automatic WEP key distribution.
2009-03-08 19:36:02 +02:00
Jouni Malinen
9e783041fa Add a workaround for EAP-FAST with Cisco AP local RADIUS server
When using the internal TLS implementation, EAP-FAST unauthenticated
provisioning ends up proposing multiple cipher suites. It looks like
Cisco AP (at least 350 and 1200 series) local authentication server does
not know how to search cipher suites from the list and seem to require
that the last entry in the list is the one that it wants to use.
However, TLS specification requires the list to be in the client
preference order. As a workaround, ass anon-DH AES-128-SHA1 again at the
end of the list to allow the Cisco code to find it.

This fixed EAP-FAST provisioning with the following IOS version:
Cisco IOS Software, C350 Software (C350-K9W7-M), Version 12.3(8)JEA3,
RELEASE SOFTWARE (fc2)
Compiled Wed 21-Nov-07 14:08 by ccai
2009-03-08 12:04:39 +02:00
Jouni Malinen
58d1f6d189 Fix EAP-FAST only build to include the needed EAPOL implementation 2009-03-08 11:29:31 +02:00
Jouni Malinen
a14bda9d9d driver_ndis: Detect Native 802.11 drivers (NDIS 6, Vista)
This is just there very first step on being able to do something with
wireless LAN on Vista. There is some example code for requesting a scan,
but it does not work in its current form. Anyway, this adds a wpa_printf
noting that Native 802.11 drivers are not yet supported.
2009-03-07 23:53:40 +02:00
Jouni Malinen
c472ef754d driver_ndis: Add PAE group address to the multicast address
This is done with wired interfaces to fix IEEE 802.1X authentication
when the authenticator uses the group address (which should be happening
with wired Ethernet authentication).

This allows wpa_supplicant to complete wired authentication successfully
on Vista with a NDIS 6 driver, but the change is likely needed for
Windows XP, too.
2009-03-07 23:10:41 +02:00
Jouni Malinen
4ef1e644eb Determiner whether driver is wired at runtime based on capabilities
Do not use just the driver name for this since driver_ndis.c supports
both wired and wireless NDIS drivers and needs to indicate the driver
type after initialization.
2009-03-07 22:05:43 +02:00
Jouni Malinen
ed843aaa33 WMM-AC: Fix hostapd processing of ADDTS Request and add test code
Calculate the estimated medium time using integer variables since there
is no real need to use floating point arithmetics here. In addition,
make sure there is no division by zero regardless of how invalid the
request from the station is. Reject invalid parameters and refuse
requests that would take most of the bandwidth by themselves.

Add test code into wpa_supplicant mlme.c to allow WMM-AC negotiation to
be tested with driver_test.
2009-03-06 20:15:00 +02:00
Jouni Malinen
5c3dd4ebbe Enable WMM support in the test MLME code
This allows driver_test to be used to test WMM negotiation.
2009-03-06 17:28:00 +02:00
Jouni Malinen
9cf548c082 Allow PN531_PATH to be overriden from .config 2009-03-06 16:25:48 +02:00
Masashi Honma
e1ee6b600b WPS: Add support for NFC out-of-band mechanism
The new file wps_nfc.c and ndef.c implements NFC device independent
operation, wps_nfc_pn531.c implements NFC device dependent operation.

This patch is only for the following use case:
- Enrollee = wpa_supplicant
- Registrar = hostapd internal Registrar

Following NFC methods can be used:
- Enrollee PIN with NFC
- Registrar PIN with NFC
- unencrypted credential with NFC

Encrypted credentials are not supported.

Enrollee side operation:

Registrar side operation:

Example configuration.
CONFIG_WPS=y
CONFIG_WPS_NFC=y
CONFIG_WPS_NFC_PN531=y

I used NFC device "NXP PN531". The NFC device access method is
confidential, so I used outer library. Please download below files from
https://www.saice-wpsnfc.bz/index.php

[WPS NFC Library]
WpsNfcLibrary/WpsNfc.h
WpsNfcLibrary/WpsNfcType.h
WpsNfcLibrary/WpsNfcVersion.h
WpsNfcLibrary/linux/libnfc_mapping_pn53x.dll
WpsNfcLibrary/linux/wpsnfc.dll

[NFC Reader/Writer Kernel Driver]
NFCKernelDriver-1.0.3/linux/kobj/sonyrw.ko

<WiFi test>
The hostapd/wpa_supplicant with this patch passed below tests on
"Wi-Fi WPS Test Plan Version 1.6".
4.2.5 Add device using NFC Method with password token
(I used SONY STA instead of NXP STA.)

4.2.6 Add device using NFC Method with configuration token

5.1.9 Add to AP using NFC Method with password token
through internal registrar
(I used SONY AP instead of NXP AP.)

5.1.10 Add to AP using NFC Method with configuration token
through internal registrar
2009-03-06 16:16:22 +02:00
Jouni Malinen
7cc1b6c900 WPS: Add a workaround for TKIP/CCMP mixed mode credentials
Many deployed APs do not handle negotiation of security parameters well
when both TKIP and CCMP (or both WPA and WPA2) are enabled. The most
common end result seems to be ending up with the least secure option..

As a workaround, check whether the AP advertises WPA2/CCMP in Beacon
frames and add those options for the credential if needed. This allows
the client to select the most secure configuration regardless of how
broken the AP's WPS implementation is as far as auth/encr type
negotiation is concerned.
2009-03-05 21:39:39 +02:00
Jouni Malinen
d85825e355 Fix UP-to-AC mapping for prio 3 (EE) to be AC_BE, not AC_VI 2009-03-05 16:37:13 +02:00
Jouni Malinen
77ac446621 Fix MLME build after WMM renames 2009-03-05 15:56:51 +02:00
Jouni Malinen
37d8922e58 Fix non-HT STA addition
35463eaed3 broke non-HT STA add by trying
to se random HT capabilities to mac80211. Fix that by using NULL ht_cap
for non-HT case.
2009-03-05 11:25:32 +02:00
Jouni Malinen
f72750896c nl80211: Add verbose result debugging for NL80211_CMD_NEW_STATION 2009-03-05 11:24:48 +02:00