wpasupplicant
15 years agoMove DTIM period configuration into Beacon set operation
Jouni Malinen [Thu, 12 Mar 2009 19:57:08 +0000 (21:57 +0200)]
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.

15 years agonl80211: Add per-BSS data structure and enable BSS add/remove
Jouni Malinen [Thu, 12 Mar 2009 19:55:42 +0000 (21:55 +0200)]
nl80211: Add per-BSS data structure and enable BSS add/remove

This allows mac80211 to be used for multi-BSSID operations.

15 years agoFT: Fix status code values to match with IEEE 802.11r-2007
Jouni Malinen [Mon, 9 Mar 2009 20:28:30 +0000 (22:28 +0200)]
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.

15 years agoFT: Add RIC Request processing and RIC Response generation
Jouni Malinen [Mon, 9 Mar 2009 20:25:58 +0000 (22:25 +0200)]
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.

15 years agoFT: Add RIC Request generation and validation (but not processing)
Jouni Malinen [Mon, 9 Mar 2009 18:45:17 +0000 (20:45 +0200)]
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).

15 years agoWPS: Add a workaround for static WEP with Windows network probe
Jouni Malinen [Sun, 8 Mar 2009 17:36:02 +0000 (19:36 +0200)]
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.

15 years agoAdd a workaround for EAP-FAST with Cisco AP local RADIUS server
Jouni Malinen [Sun, 8 Mar 2009 10:04:39 +0000 (12:04 +0200)]
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

15 years agoFix EAP-FAST only build to include the needed EAPOL implementation
Jouni Malinen [Sun, 8 Mar 2009 09:29:31 +0000 (11:29 +0200)]
Fix EAP-FAST only build to include the needed EAPOL implementation

15 years agodriver_ndis: Detect Native 802.11 drivers (NDIS 6, Vista)
Jouni Malinen [Sat, 7 Mar 2009 21:53:40 +0000 (23:53 +0200)]
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.

15 years agodriver_ndis: Add PAE group address to the multicast address
Jouni Malinen [Sat, 7 Mar 2009 21:10:41 +0000 (23:10 +0200)]
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.

15 years agoDeterminer whether driver is wired at runtime based on capabilities
Jouni Malinen [Sat, 7 Mar 2009 20:05:43 +0000 (22:05 +0200)]
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.

15 years agoWMM-AC: Fix hostapd processing of ADDTS Request and add test code
Jouni Malinen [Fri, 6 Mar 2009 18:12:31 +0000 (20:12 +0200)]
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.

15 years agoEnable WMM support in the test MLME code
Jouni Malinen [Fri, 6 Mar 2009 14:47:05 +0000 (16:47 +0200)]
Enable WMM support in the test MLME code

This allows driver_test to be used to test WMM negotiation.

15 years agoAllow PN531_PATH to be overriden from .config
Jouni Malinen [Fri, 6 Mar 2009 14:25:48 +0000 (16:25 +0200)]
Allow PN531_PATH to be overriden from .config

15 years agoWPS: Add support for NFC out-of-band mechanism
Masashi Honma [Fri, 6 Mar 2009 14:16:22 +0000 (16:16 +0200)]
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

15 years agoWPS: Add a workaround for TKIP/CCMP mixed mode credentials
Jouni Malinen [Thu, 5 Mar 2009 19:39:39 +0000 (21:39 +0200)]
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.

15 years agoFix UP-to-AC mapping for prio 3 (EE) to be AC_BE, not AC_VI
Jouni Malinen [Thu, 5 Mar 2009 14:37:13 +0000 (16:37 +0200)]
Fix UP-to-AC mapping for prio 3 (EE) to be AC_BE, not AC_VI

15 years agoFix MLME build after WMM renames
Jouni Malinen [Thu, 5 Mar 2009 13:56:51 +0000 (15:56 +0200)]
Fix MLME build after WMM renames

15 years agoFix non-HT STA addition
Jouni Malinen [Thu, 5 Mar 2009 09:25:32 +0000 (11:25 +0200)]
Fix non-HT STA addition

35463eaed391107dbe4a2dcaeb43aaa20e227a1e 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.

15 years agonl80211: Add verbose result debugging for NL80211_CMD_NEW_STATION
Jouni Malinen [Thu, 5 Mar 2009 09:24:48 +0000 (11:24 +0200)]
nl80211: Add verbose result debugging for NL80211_CMD_NEW_STATION

15 years agoNo need for including endian.h anymore
Jouni Malinen [Wed, 4 Mar 2009 14:29:36 +0000 (16:29 +0200)]
No need for including endian.h anymore

15 years agoNo need to check WMM IE OUI or type here
Jouni Malinen [Wed, 4 Mar 2009 14:28:47 +0000 (16:28 +0200)]
No need to check WMM IE OUI or type here

IE parser has already taken care of this. In addition, show QoS info
field in debug output.

15 years agoUse bit mask/shift and helper functions instead of C bit fields
Jouni Malinen [Wed, 4 Mar 2009 14:23:44 +0000 (16:23 +0200)]
Use bit mask/shift and helper functions instead of C bit fields

15 years agoWMM cleanup (WME -> WMM rename, comments, etc.)
Jouni Malinen [Wed, 4 Mar 2009 10:33:24 +0000 (12:33 +0200)]
WMM cleanup (WME -> WMM rename, comments, etc.)

This updates the terminogy to match with the final WMM specification. In
addition, some of the WMM TSPEC structure fields were in incorrect order
and used without byte order swapping. Those are also taken care of this
cleanup patch.

15 years agoRemove unused tsinfo()
Jouni Malinen [Wed, 4 Mar 2009 09:32:51 +0000 (11:32 +0200)]
Remove unused tsinfo()

15 years agoAdd build option CONFIG_TERMINATE_ONLASTIF
Sam Leffler [Mon, 2 Mar 2009 19:57:00 +0000 (21:57 +0200)]
Add build option CONFIG_TERMINATE_ONLASTIF

This makes wpa_supplicant terminate automatically if the configured
interface(s) disappear.

15 years agoAdd support for wpa_supplicant syslog output
Sam Leffler [Mon, 2 Mar 2009 19:40:44 +0000 (21:40 +0200)]
Add support for wpa_supplicant syslog output

Enable for build: CFLAGS += -DCONFIG_DEBUG_SYSLOG in .config
Enable at runtime: -s on command line

15 years agoFix hostapd build with RADIUS support removed
Jouni Malinen [Mon, 2 Mar 2009 19:25:53 +0000 (21:25 +0200)]
Fix hostapd build with RADIUS support removed

15 years agoPass negotiated ht capability information after the association
vasanth [Mon, 2 Mar 2009 17:17:35 +0000 (19:17 +0200)]
Pass negotiated ht capability information after the association

This patch replaces the station's ht capability information with the
negotiated one in NL80211_CMD_NEW_STATION. This negotiated ht
capability will be needed for rate control initialization in the
driver.

Signed-off-by: vasanth <vasanth@atheros.com>

15 years agoFix EAPOL/EAP reauthentication with external RADIUS server
Jouni Malinen [Mon, 2 Mar 2009 17:06:23 +0000 (19:06 +0200)]
Fix EAPOL/EAP reauthentication with external RADIUS server

The EAP server state machine will need to have special code in
getDecision() to avoid starting passthrough operations before having
completed Identity round in the beginning of reauthentication. This was
broken when moving into using the full authenticator state machine from
RFC 4137 in 0.6.x.

15 years agoFix builds that need SHA256 or mod_exp, but not TLS functions
Jouni Malinen [Fri, 27 Feb 2009 15:46:40 +0000 (17:46 +0200)]
Fix builds that need SHA256 or mod_exp, but not TLS functions

15 years agoWPS: Convert WEP key to hex
Jouni Malinen [Fri, 27 Feb 2009 15:08:17 +0000 (17:08 +0200)]
WPS: Convert WEP key to hex

Use of hex is safer since the enrollee may configure AP with 5 or 13
random octets of binary data as the key.

15 years agoFix Enrollee WPS state attribute in AP
Masashi Honma [Fri, 27 Feb 2009 15:01:17 +0000 (17:01 +0200)]
Fix Enrollee WPS state attribute in AP

Only non-AP Enrollee should hard code the state to be not configured.

15 years agoUpdate EAP-GPSK references from internet draft to RFC 5433
Jouni Malinen [Thu, 26 Feb 2009 21:08:40 +0000 (23:08 +0200)]
Update EAP-GPSK references from internet draft to RFC 5433

15 years agoWPS UFD: Add entry to ChangeLog
Jouni Malinen [Thu, 26 Feb 2009 20:10:50 +0000 (22:10 +0200)]
WPS UFD: Add entry to ChangeLog

15 years agoWPS UFD: Build OOB functionality only if UFD is enabled
Jouni Malinen [Thu, 26 Feb 2009 20:10:21 +0000 (22:10 +0200)]
WPS UFD: Build OOB functionality only if UFD is enabled

15 years agoWPS UFD: Use pre-configured DH keys only with OOB
Jouni Malinen [Thu, 26 Feb 2009 20:09:35 +0000 (22:09 +0200)]
WPS UFD: Use pre-configured DH keys only with OOB

The old behavior of generating new DH keys can be maintained for non-OOB
cases and only OOB (in this case, with UFD) will use the pre-configured
DH keys to allow the public key hash to be checked.

15 years agoWPS UFD: Remove oob_dev pointer from wps_context
Jouni Malinen [Thu, 26 Feb 2009 20:07:55 +0000 (22:07 +0200)]
WPS UFD: Remove oob_dev pointer from wps_context

This pointer and the especially the oob_dev->device_path does not remain
valid, so better not save it any longer than it is needed.

15 years agoWPS UFD: Handle scandir() error and no matches results differently
Jouni Malinen [Thu, 26 Feb 2009 20:06:11 +0000 (22:06 +0200)]
WPS UFD: Handle scandir() error and no matches results differently

Better make sure there are no memory leaks in case of 0 entries
found. In addition, the error string may be of use in the error case.

15 years agoWPS UFD: Define macros for the UFD directory templates
Jouni Malinen [Thu, 26 Feb 2009 20:05:39 +0000 (22:05 +0200)]
WPS UFD: Define macros for the UFD directory templates

This allows the UNIX vs. DOS path separators to be handled in the build.

15 years agoWPS UFD: Use private data structure for oob_device_data
Jouni Malinen [Thu, 26 Feb 2009 20:04:49 +0000 (22:04 +0200)]
WPS UFD: Use private data structure for oob_device_data

This gets rid of global variable use and may be needed to allow
concurrent access in some case if the interface is extended.

15 years agoWPS UFD: Make build conditional on CONFIG_WPS_UFD=y
Jouni Malinen [Thu, 26 Feb 2009 20:01:36 +0000 (22:01 +0200)]
WPS UFD: Make build conditional on CONFIG_WPS_UFD=y

Not all embedded devices have USB interface and it is useful to be able
to remove unneeded functionality from the binary. In addition, the
current implementation has some UNIX specific calls in it which may make
it not compile cleanly on all target systems.

15 years agoWPS UFD: Use mkdir() instead of system("mkdir ..")
Jouni Malinen [Thu, 26 Feb 2009 20:00:29 +0000 (22:00 +0200)]
WPS UFD: Use mkdir() instead of system("mkdir ..")

15 years agoWPS: Add UFD support (USBA out-of-band mechanism)
Masashi Honma [Thu, 26 Feb 2009 19:57:38 +0000 (21:57 +0200)]
WPS: Add UFD support (USBA out-of-band mechanism)

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

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

Encrypted credentials are not supported.

Enrollee side operation:
wpa_cli -i ath0 wps_oob <device type> <mount point> <oob method>
    oob method = pin-e/pin-r/cred

wpa_cli -i ath0 wps_oob ufd /mnt/ pin-r

Registrar side operation:
./hostapd_cli -i ath0 wps_oob <device type> <mount point> <oob method>
    oob method = pin-e/pin-r/cred

hostapd_cli -i ath0 wps_oob ufd /mnt/ cred

15 years agoReduce latency on starting WPS negotiation (TX EAPOL-Start earlier)
Jouni Malinen [Mon, 23 Feb 2009 18:59:27 +0000 (20:59 +0200)]
Reduce latency on starting WPS negotiation (TX EAPOL-Start earlier)

Reduce startWhen from 3 to 1 second if WPS is included in the build.
While this is done regardless of runtime WPS configuration, it is fine
to use a smaller value here in general. This cuts two seconds out from
WPS negotiation if the driver does not support addition of WPS IE into
the (Re)Association Request frame.

15 years agoFix WPS in non-WPA modes with drivers that implement MLME
Jouni Malinen [Mon, 23 Feb 2009 18:57:07 +0000 (20:57 +0200)]
Fix WPS in non-WPA modes with drivers that implement MLME

Need to set WLAN_STA_WPS and WLAN_STA_MAYBE_WPS flags even if WPA is not
enabled. This allows open and static WEP modes to initiate WPS
negotiation with madwifi-like drivers.

15 years agoAllow SHA256-based key handshake to be used without 802.11r
Jouni Malinen [Thu, 19 Feb 2009 17:49:34 +0000 (19:49 +0200)]
Allow SHA256-based key handshake to be used without 802.11r

Previously, both CONFIG_IEEE80211W=y and CONFIG_IEEE80211R=y were needed
to enable SHA256-based key handshake (WPA-PSK-SHA256 and
WPA-EAP-SHA256). This can now be done with just CONFIG_IEEE80211W=y.

15 years agoAdd new driver wrapper for the Atheros driver
Jouni Malinen [Thu, 19 Feb 2009 14:27:07 +0000 (16:27 +0200)]
Add new driver wrapper for the Atheros driver

This uses similar, but not identical, interface to madwifi. It is easier
to keep this separate to avoid conflicts with potential changes in the
driver interfaces.

15 years agoWPS: Use WEP key index 1..4 instead of 0..3 when configuring AP
Jouni Malinen [Wed, 18 Feb 2009 18:17:47 +0000 (20:17 +0200)]
WPS: Use WEP key index 1..4 instead of 0..3 when configuring AP

15 years agoWPS: Fix WEP key index to use 1..4 instead of 0..3
Andriy Tkachuk [Wed, 18 Feb 2009 17:58:44 +0000 (19:58 +0200)]
WPS: Fix WEP key index to use 1..4 instead of 0..3

It seems that WFA WPS spec says that default key index should be 1 (not
0). I think this meas that WEP key indexes region is not from 0 to 3,
but from 1 to 4 in WPS. At least WRT610N implemented it this way.

15 years agoFix hostapd build without NEED_MLME
Sebastien Decugis [Wed, 18 Feb 2009 17:43:07 +0000 (19:43 +0200)]
Fix hostapd build without NEED_MLME

The following patch fixes a compilation issue when compiling hostapd to
serve as pure RADIUS authentication server.

15 years agoAdd BSS flags to scan results to indicate signal quality validity
Jouni Malinen [Wed, 18 Feb 2009 11:40:38 +0000 (13:40 +0200)]
Add BSS flags to scan results to indicate signal quality validity

These flags are used to mark which values (level, noise, qual) are
invalid (not available from the driver) and whether level is using dBm.
D-Bus interface will now only report the values that were available.

15 years agonl80211: Use per-scan request WPS IE
Jouni Malinen [Wed, 18 Feb 2009 10:49:25 +0000 (12:49 +0200)]
nl80211: Use per-scan request WPS IE

Replace the global set probe request IEs mechanism with a new nl80211
option for specifying vendor IEs for each scan request.

15 years agonl80211: Add TX/RX packet counts into accounting information
Jouni Malinen [Wed, 18 Feb 2009 09:29:45 +0000 (11:29 +0200)]
nl80211: Add TX/RX packet counts into accounting information

15 years agoSync nl80211_copy.h with wireless-testing linux/nl80211.h
Jouni Malinen [Wed, 18 Feb 2009 09:28:55 +0000 (11:28 +0200)]
Sync nl80211_copy.h with wireless-testing linux/nl80211.h

15 years agoWPS: support WEP keys in hex characters format in received credentials
Andriy Tkachuk [Tue, 17 Feb 2009 08:30:43 +0000 (10:30 +0200)]
WPS: support WEP keys in hex characters format in received credentials

Attached patch makes wpa_supplicant support WEP keys in hex characters
format in received credentials from Registrars (tested with WRT610N).

15 years agoWPS: support registration with APs in WEP security mode
Andriy Tkachuk [Tue, 17 Feb 2009 08:17:24 +0000 (10:17 +0200)]
WPS: support registration with APs in WEP security mode

Attached patch fixes the issue when supplicant does not select APs in
WEP security mode for WPS registration.

15 years agoUpdated to-do list for wpa_supplicant
Jouni Malinen [Mon, 16 Feb 2009 18:50:55 +0000 (20:50 +0200)]
Updated to-do list for wpa_supplicant

No point in using time with Host AP driver optimizations anymore.
Note another race condition with 4-way handshake (and PTK config to
driver).

15 years agodriver_nl80211: Fix STA accounting data collection
Jouni Malinen [Mon, 16 Feb 2009 11:28:42 +0000 (13:28 +0200)]
driver_nl80211: Fix STA accounting data collection

TX/RX bytes are now reported correctly (typo ended up leaving TX bytes
uninitialized and set RX bytes value to use correct TX bytes). TX/RX
packet counts are not yet available from kernel, so we have to clear the
values to avoid reporting bogus data.

15 years agoPreparations for 0.6.8 release
Jouni Malinen [Sun, 15 Feb 2009 18:17:25 +0000 (20:17 +0200)]
Preparations for 0.6.8 release

15 years agoUpdate nmake.mak to match with current files
Jouni Malinen [Sun, 15 Feb 2009 16:35:23 +0000 (18:35 +0200)]
Update nmake.mak to match with current files

15 years agoDo not try session resumption after EAP failure
Jouni Malinen [Sun, 15 Feb 2009 15:36:49 +0000 (17:36 +0200)]
Do not try session resumption after EAP failure

If session resumption fails for any reason, do not try it again because
that is just likely to fail. Instead, drop back to using full
authentication which may work. This is a workaround for servers that do
not like session resumption, but do not know how to fall back to full
authentication properly.

15 years agoAvoid using #ifdef inside printf string
Jouni Malinen [Sun, 15 Feb 2009 12:35:30 +0000 (14:35 +0200)]
Avoid using #ifdef inside printf string

This makes it easier to use a preprocessor macro for printf.

15 years agoImproved 'make install' (use BINDIR/LIBDIR, install shared objects)
Daniel Mierswa [Sun, 15 Feb 2009 12:22:50 +0000 (14:22 +0200)]
Improved 'make install' (use BINDIR/LIBDIR, install shared objects)

15 years agoAllow the privsep driver to pass the set_country to the real driver
Daniel Mierswa [Sun, 15 Feb 2009 12:13:27 +0000 (14:13 +0200)]
Allow the privsep driver to pass the set_country to the real driver

15 years agoCheck EAP-AKA' AT_KDF duplication only if KDF was negotiated
Jouni Malinen [Sun, 15 Feb 2009 08:28:55 +0000 (10:28 +0200)]
Check EAP-AKA' AT_KDF duplication only if KDF was negotiated

This fixes an issue where two AKA'/Challenge messages are received when
resynchronizing SEQ#. Previously, this used to trigger an authentication
failure since the second Challenge message did not duplicate AT_KDF.

15 years agoAdd debug prints for couple of new EAP-AKA' attributes
Jouni Malinen [Sun, 15 Feb 2009 08:28:16 +0000 (10:28 +0200)]
Add debug prints for couple of new EAP-AKA' attributes

15 years agoRename "broadcast SSID" to "wildcard SSID"
Jouni Malinen [Sat, 14 Feb 2009 20:21:17 +0000 (22:21 +0200)]
Rename "broadcast SSID" to "wildcard SSID"

"Wildcard SSID" is the term used in IEEE Std 802.11-2007, so it is a
better name for the zero-length SSID used in Probe Request.

15 years agodriver_nl80211: Add support for multi-SSID scan requests
Jouni Malinen [Sat, 14 Feb 2009 19:17:46 +0000 (21:17 +0200)]
driver_nl80211: Add support for multi-SSID scan requests

15 years agoAdd support for multi-SSID scan requests
Jouni Malinen [Sat, 14 Feb 2009 18:59:26 +0000 (20:59 +0200)]
Add support for multi-SSID scan requests

If the driver reports support for more than one SSID per scan request,
optimize scan_ssid=1 operations in ap_scan=1 mode. This speeds up
scanning whenever scan_ssid=1 is used since the broadcast SSID can be
included in every scan request and if driver supports more than two
SSIDs in the scan request, the benefits are even larger when multiple
networks have been configured with ap_scan=1.

This is also cleaning up wpa_supplicant_scan() function by moving code
around so that the SSID list is not processed unnecessarily if the
operation mode does not need this.

15 years agodriver_test: Implement scan2() handler
Jouni Malinen [Sat, 14 Feb 2009 15:11:21 +0000 (17:11 +0200)]
driver_test: Implement scan2() handler

This does not actually send out separate scan requests for each SSID,
but the debug output can be used to test scan2() functionality with
multiple SSIDs.

15 years agoAdd extended driver scan request command: driver_ops::scan2()
Jouni Malinen [Sat, 14 Feb 2009 15:01:32 +0000 (17:01 +0200)]
Add extended driver scan request command: driver_ops::scan2()

This can be used to provide support for scanning multiple SSIDs at a
time to optimize scan_ssid=1 operations. In addition, Probe Request IEs
will be available to scan2() (e.g., for WPS PBC scanning).

15 years agoAllow multiple driver wrappers to be specified on command line
Jouni Malinen [Sat, 14 Feb 2009 14:43:43 +0000 (16:43 +0200)]
Allow multiple driver wrappers to be specified on command line

For example, -Dnl80211,wext could be used to automatically select
between nl80211 and wext. The first driver wrapper that is able to
initialize the interface will be used.

15 years agonl80211: Remove one second sleep after iface up
Jouni Malinen [Thu, 12 Feb 2009 20:02:19 +0000 (22:02 +0200)]
nl80211: Remove one second sleep after iface up

This workaround was needed with some drivers that used WEXT, but there
is no known nl80211-enabled driver that would need this, so lets get rid
of the extra delay.

15 years agoNew driver capability info: max number of scan SSIDs
Jouni Malinen [Thu, 12 Feb 2009 19:49:57 +0000 (21:49 +0200)]
New driver capability info: max number of scan SSIDs

The driver wrappers can now inform wpa_supplicant how many SSIDs can
be used in a single scan request (i.e., send multiple Probe Requests
per channel). This value is not yet used, but it can eventually be used
to allow a new scan command to specify multiple SSIDs to speed up
scan_ssid=1 operations. In addition, a warning could be printed if
scan_ssid=1 is used with a driver that does not support it
(max_scan_ssids=0).

15 years agonl80211: Replace WEXT scan event with nl80211
Jouni Malinen [Thu, 12 Feb 2009 18:11:43 +0000 (20:11 +0200)]
nl80211: Replace WEXT scan event with nl80211

Use the new nl80211 scan event mechanism instead of the WEXT event.
This completes the move from WEXT scanning into nl80211 scanning.

15 years agonl80211: Replace SIOCGIWSCAN with NL80211_CMD_GET_SCAN
Jouni Malinen [Thu, 12 Feb 2009 15:12:58 +0000 (17:12 +0200)]
nl80211: Replace SIOCGIWSCAN with NL80211_CMD_GET_SCAN

This replaces the WEXT mechanism for fetching scan results with the new
nl80211 mechanism.

15 years agonl80211: Replace SIOCSIWSCAN with NL80211_CMD_TRIGGER_SCAN
Jouni Malinen [Thu, 12 Feb 2009 14:20:22 +0000 (16:20 +0200)]
nl80211: Replace SIOCSIWSCAN with NL80211_CMD_TRIGGER_SCAN

This is the first step in replacing WEXT-based scan with the new
nl80211-based mechanism.

15 years agoSync nl80211.h with the current wireless-testing version
Jouni Malinen [Thu, 12 Feb 2009 12:46:26 +0000 (14:46 +0200)]
Sync nl80211.h with the current wireless-testing version

15 years agoRemoved an obsolete comment about use of external program for EAP
Jouni Malinen [Wed, 11 Feb 2009 20:35:27 +0000 (22:35 +0200)]
Removed an obsolete comment about use of external program for EAP

15 years agoAdd another Milenage test set that is suitable for EAP-AKA'
Jouni Malinen [Wed, 11 Feb 2009 15:29:03 +0000 (17:29 +0200)]
Add another Milenage test set that is suitable for EAP-AKA'

The Test Set 19 from TS 35.208 has an AMF with the separation bit set
and as such, it is suitable for EAP-AKA' testing.

15 years agoEAP-AKA': Verify that AMF separation bit is set
Jouni Malinen [Wed, 11 Feb 2009 15:28:42 +0000 (17:28 +0200)]
EAP-AKA': Verify that AMF separation bit is set

15 years agowpa_gui-qt4: Add support for selecting between WEP open/shared key auth
Jouni Malinen [Tue, 10 Feb 2009 13:26:26 +0000 (15:26 +0200)]
wpa_gui-qt4: Add support for selecting between WEP open/shared key auth

Split the auth=none option into three: open, WEP, WEP with shared key to
allow the user specify WEP with shared key authentication. In addition,
fix static WEP key edits to be enabled only when using static WEP keys
(i.e., not for IEEE 802.1X).

15 years agoFix test-sha256 build
Jouni Malinen [Tue, 10 Feb 2009 12:31:27 +0000 (14:31 +0200)]
Fix test-sha256 build

15 years agoUse signal quality if level is not available for comparing max rates
Helmut Schaa [Tue, 10 Feb 2009 11:47:14 +0000 (13:47 +0200)]
Use signal quality if level is not available for comparing max rates

Some drivers (for example ipw2100) do not report signal level but only
signal quality. wpa_supplicant already uses the signal quality if no
level is reported and all other comparision parameters are equal to sort
the scan results. However, if two APs have different max rates and the
signal level does not differ much wpa_supplicant chooses the AP with the
higher max rate.

In case of ipw2100 no signal level is reported and thus wpa_supplicant
always takes the AP with higher max rate even if its signal quality is
really low. For example if AP1 (max rate 11Mb/s, 80% signal quality) and
AP2 (max rate 54 Mb/s, 20% signal quality) are found by a scan
wpa_supplicant would choose AP2.

Hence, if no signal level is reported depend on the signal quality if
max rate should be compared. A quality difference of 10% is considered
acceptable in favor of the higher max rate.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>

15 years agoFixed a copy-paste error in a function documentation
Jouni Malinen [Tue, 10 Feb 2009 09:45:17 +0000 (11:45 +0200)]
Fixed a copy-paste error in a function documentation

15 years agowext: Force disconnect on deauthenticate()
Jouni Malinen [Tue, 10 Feb 2009 09:43:40 +0000 (11:43 +0200)]
wext: Force disconnect on deauthenticate()

Use the same zero-BSSID, random-SSID trick for both disassociate() and
deauthenticate().

15 years agowext: really disassociate (set random SSID)
Dan Williams [Tue, 10 Feb 2009 09:40:19 +0000 (11:40 +0200)]
wext: really disassociate (set random SSID)

Really disassociate when tearing stuff down; drivers may sometimes
(legally) keep trying to reassociate unless the BSSID is unlocked.  If
the SSID is unlocked too, under WEXT drivers are able to pick an SSID to
associate, so kill that behavior by setting a bogus SSID.  Unfortunately
WEXT doesn't provide an easy method to say "stop whatever doing and just
idle".

Signed-off-by: Dan Williams <dcbw@redhat.com>

15 years agoWPS: Fix clearing of WPS IE with madwifi driver
Masashi Honma [Tue, 10 Feb 2009 09:23:59 +0000 (11:23 +0200)]
WPS: Fix clearing of WPS IE with madwifi driver

On WPS init/deinit process, the hostapd clears it's own WPS IE
with 0 length WPS IE. But it fails. Because the parameter to
ioctl is too short. Then hostapd prints a below message.

ioctl[IEEE80211_IOCTL_SET_APPIEBUF]: Invalid argument

15 years agoUse larger buffer for TLS encryption to avoid issues with GnuTLS
Jouni Malinen [Mon, 9 Feb 2009 20:37:55 +0000 (22:37 +0200)]
Use larger buffer for TLS encryption to avoid issues with GnuTLS

It looks like GnuTLS (at least newer versions) is using random padding
on the application data and the previously used 100 byte extra buffer
for tls_connection_encrypt() calls was not enough to handle all cases.
This resulted in semi-random authentication failures with EAP-PEAP and
EAP-TTLS during Phase 2.

Increase the extra space for encryption from 100 to 300 bytes and add an
error message into tls_gnutls.c to make it easier to notice this issue
should it ever show up again even with the larger buffer.

15 years agoWPS: Set correct Selected Registrar Config Methods attribute
Masashi Honma [Mon, 9 Feb 2009 17:50:52 +0000 (19:50 +0200)]
WPS: Set correct Selected Registrar Config Methods attribute

I tried PBC with the hostapd registrar.
I pushed the button with "hostap_cli WPS_PBC".
But hostapd registrar always sends Selected Registrar Config Methods
attribute=0x0000 in beacon/probe response.

15 years agoSend a dbus reply only if requested by the caller
Helmut Schaa [Mon, 9 Feb 2009 17:45:06 +0000 (19:45 +0200)]
Send a dbus reply only if requested by the caller

wpa_supplicant should not send a dbus reply as response to a method call
if no reply was requested by the caller. Sending a reply even if not
requested is basically no problem but triggers dbus warnings like the
one below.

Feb  9 07:31:23 linux-gvjr dbus-daemon: Rejected send message, 2 matched
rules; type="error", sender=":1.129" (uid=0 pid=30228
comm="/usr/sbin/wpa_supplicant -c /etc/wpa_supplicant/wp")
interface="(unset)" member="(unset)" error
name="fi.epitest.hostap.WPASupplicant.InvalidInterface"
requested_reply=0 destination=":1.128" (uid=0 pid=30226
comm="/usr/sbin/NetworkManager "))

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>

15 years agoCreate os_daemon for OS X, as it's now deprecated (Leopard)
Alan T. DeKok [Sun, 8 Feb 2009 11:40:34 +0000 (13:40 +0200)]
Create os_daemon for OS X, as it's now deprecated (Leopard)

Using it results in an error at build time.  So we replace it.

15 years agoAllow driver_bsd.c to be built for NetBSD
Jeremy C. Reed [Sun, 8 Feb 2009 11:28:37 +0000 (13:28 +0200)]
Allow driver_bsd.c to be built for NetBSD

15 years agoUse os_strlcpy instead of os_strncpy when copying ifname
Jouni Malinen [Sun, 8 Feb 2009 11:26:33 +0000 (13:26 +0200)]
Use os_strlcpy instead of os_strncpy when copying ifname

In theory, the ifname could be IFNAMSIZ characters long and there would
not be room for null termination.

15 years agoFix MinGW build with CONFIG_EAP_TNC=y
Jouni Malinen [Sun, 8 Feb 2009 10:47:28 +0000 (12:47 +0200)]
Fix MinGW build with CONFIG_EAP_TNC=y

MinGW does not use -ldl so do not add this unconditionally.

15 years agoAvoid memory leak on error path in crypto_cipher_init()
Jouni Malinen [Sat, 7 Feb 2009 10:07:06 +0000 (12:07 +0200)]
Avoid memory leak on error path in crypto_cipher_init()

15 years agoAdd crypto_cipher_{init,encrypt,decrypt,deinit} for GnuTLS
Jouni Malinen [Sat, 7 Feb 2009 10:04:45 +0000 (12:04 +0200)]
Add crypto_cipher_{init,encrypt,decrypt,deinit} for GnuTLS

15 years agoFix privsep build with CONFIG_CLIENT_MLME=y
Jouni Malinen [Sat, 7 Feb 2009 08:30:32 +0000 (10:30 +0200)]
Fix privsep build with CONFIG_CLIENT_MLME=y

Add wpa_supplicant_sta_free_hw_features() and wpa_supplicant_sta_rx()
for driver wrappers in wpa_priv.

15 years agoInclude wpabuf.o in wpa_priv build
Daniel Mierswa [Sat, 7 Feb 2009 08:19:28 +0000 (10:19 +0200)]
Include wpabuf.o in wpa_priv build

If you choose to use CONFIG_PRIVSEP=y, the wpabuf functions seem to
miss. The attached patch is against trunk and should probably fix it.