libeap.git
13 years agonl80211: Ignore "DEAUTH" messages from APs we are not associated to
Paul Stewart [Mon, 16 Aug 2010 18:27:26 +0000 (21:27 +0300)]
nl80211: Ignore "DEAUTH" messages from APs we are not associated to

DEAUTH messages can come from a number of different sources. The one
that's hurting us currently is DEAUTH netlink messages coming to us
from compat-wireless in response to local_state_change DEAUTH messages
we sent as a part of cleaning up state in driver_nl80211's
clear_state_mismatch() function. However, DEAUTH messages can come
from a variety of unwanted sources, including directed denial-of-service
attacks (although MAC verification doesn't place that high a barrier),
so this validation is actually generically useful, I think.

The downside to this method is that without a kernel based approach
"iw dev wlan0 link" no longer works correctly after clear_state_mismatch()
is done.  This will be pursued with the kernel folks.

13 years agoFix RSN preauth candidate list clearing to avoid segfaults
Daniel Gryniewicz [Sat, 14 Aug 2010 16:01:14 +0000 (19:01 +0300)]
Fix RSN preauth candidate list clearing to avoid segfaults

Commit c5b26e33c1829c62c3b5872865ca202f6c42436e broke the processing
of the candidate list entries when an old entry was either removed or
reused. The entry needs to be removed from the list to avoid leaving
pointers to freed memory.

http://bugs.gentoo.org/show_bug.cgi?id=330085
http://w1.fi/bugz/show_bug.cgi?id=372

13 years agonl80211: Don't pass ctx to wpa_driver_nl80211_init_nl
Johannes Berg [Wed, 11 Aug 2010 09:55:51 +0000 (11:55 +0200)]
nl80211: Don't pass ctx to wpa_driver_nl80211_init_nl

Currently, we don't use the sock_ctx that we get passed by eloop, so
don't assign it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
13 years agonl80211: Remove unused pending_send_action
Johannes Berg [Wed, 11 Aug 2010 10:20:51 +0000 (12:20 +0200)]
nl80211: Remove unused pending_send_action

This variable is assigned only once and never tested, so basically
unused.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
13 years agoAdd a mechanism to insert notes to wpa_supplicant debug log
Jouni Malinen [Wed, 4 Aug 2010 16:11:32 +0000 (09:11 -0700)]
Add a mechanism to insert notes to wpa_supplicant debug log

This can be used to insert information from external programs to the
wpa_supplicant debug log.

13 years agoWPS: Make DH debug prints easier to understand
Jouni Malinen [Sun, 27 Jun 2010 04:06:44 +0000 (21:06 -0700)]
WPS: Make DH debug prints easier to understand

13 years agonl80211: Show remain-on-channel duration in debug output
Jouni Malinen [Sun, 18 Jul 2010 21:30:24 +0000 (14:30 -0700)]
nl80211: Show remain-on-channel duration in debug output

13 years agonl80211: Try mode changes multiple times to avoid some races
Jouni Malinen [Sun, 18 Jul 2010 21:30:24 +0000 (14:30 -0700)]
nl80211: Try mode changes multiple times to avoid some races

cfg80211/mac80211 seems to be unwilling to change interface mode in
some cases. Make these less likely to cause problems by trying the
changes up to 10 times with 100 msec intervals.

13 years agowpa_cli: Clean up redrawing and filter out BSS added/removed events
Jouni Malinen [Sun, 18 Jul 2010 21:30:24 +0000 (14:30 -0700)]
wpa_cli: Clean up redrawing and filter out BSS added/removed events

13 years agoWPS: Allow AP to start in Enrollee mode without AP PIN for probing
Jouni Malinen [Tue, 27 Jul 2010 01:12:08 +0000 (18:12 -0700)]
WPS: Allow AP to start in Enrollee mode without AP PIN for probing

In theory, this should not really be needed, but Windows 7 uses
Registrar mode to probe AP's WPS capabilities before trying to use
Enrollee and fails if the AP does not allow that probing to happen.
This allows the AP to start as an Enrollee and send M1, but refuse
to continue beyond that (M3 will not be sent if AP PIN is not known).

13 years agoFT: Send RRB data directly when managed by same hostapd process
Jouni Malinen [Mon, 26 Jul 2010 03:30:12 +0000 (20:30 -0700)]
FT: Send RRB data directly when managed by same hostapd process

This makes it easier (and a bit faster) to handle multiple local
radios with FT. There is no need to depend on l2_packet in that
case since the frame can be delivered as a direct function call.

13 years agoWPS: Limit WPS ER event_id < 2^31 bits to avoid issues with atoi()
Jouni Malinen [Tue, 20 Jul 2010 01:53:57 +0000 (18:53 -0700)]
WPS: Limit WPS ER event_id < 2^31 bits to avoid issues with atoi()

Previously, large event_id values (> 2^31) resulted in integer
overflow that would make ER drop all events from the AP.

13 years agoEAP server: Add support for configuring fragment size
Jouni Malinen [Mon, 19 Jul 2010 02:28:53 +0000 (19:28 -0700)]
EAP server: Add support for configuring fragment size

13 years agoWPS: Allow fragment size to be configured
Jouni Malinen [Mon, 19 Jul 2010 02:11:09 +0000 (19:11 -0700)]
WPS: Allow fragment size to be configured

13 years agoRemove get-first-scan-results-before-request optimization
Jouni Malinen [Wed, 7 Jul 2010 03:31:10 +0000 (20:31 -0700)]
Remove get-first-scan-results-before-request optimization

This has already been disabled in most use cases and can result
in problems with some drivers, so better just remove it completely.

13 years agoWPS: Move from WLAN_STA_MAYBE_WPS to WLAN_STA_WPS based on EAP messages
Jouni Malinen [Tue, 6 Jul 2010 22:29:33 +0000 (15:29 -0700)]
WPS: Move from WLAN_STA_MAYBE_WPS to WLAN_STA_WPS based on EAP messages

If the station does not include WSC IE in Association Request, it
is marked with WLAN_STA_MAYBE_WPS flag. We can update that to
WLAN_STA_WPS if the station uses either of the WPS identity strings.
This enables some workarounds for WPS stations.

13 years agoWPS: Reduce client timeout with EAP-WSC to avoid long wait
Jouni Malinen [Tue, 6 Jul 2010 19:58:15 +0000 (12:58 -0700)]
WPS: Reduce client timeout with EAP-WSC to avoid long wait

This works around issues with EAP-Failure getting lost for some reason.
Instead of waiting up to 60 seconds on a timeout, 30 second timeout is
now used and whenever the provisioning step has been completed (either
successfully or unsuccessfully), this timeout is reduced to 2 seconds.

13 years agoWPS: Force disconnection after provisioning step
Jouni Malinen [Tue, 6 Jul 2010 19:56:02 +0000 (12:56 -0700)]
WPS: Force disconnection after provisioning step

This works around some problems where the station is unable to disconnect
for some reason (e.g., if EAP-Failure gets dropped).

13 years agoAdd some more debug for driver events
Jouni Malinen [Sun, 18 Jul 2010 03:33:34 +0000 (20:33 -0700)]
Add some more debug for driver events

13 years agoIgnore scan results in wpa_supplicant AP mode
Jouni Malinen [Sun, 18 Jul 2010 03:32:25 +0000 (20:32 -0700)]
Ignore scan results in wpa_supplicant AP mode

This is needed to avoid trying to reassociate based on new scan
results when using wpa_supplicant to control AP mode. This could
happen if something external triggered the driver to run a scan.

13 years agoWPS: Do not allow Label and Display config methods to be enabled
Jouni Malinen [Sun, 18 Jul 2010 03:30:49 +0000 (20:30 -0700)]
WPS: Do not allow Label and Display config methods to be enabled

It is unclear which PIN is used if both Label and Display config
methods are advertised. Avoid this by not allowing such configuration.

13 years agoSME: Do not skip initial scan request
Jouni Malinen [Sun, 18 Jul 2010 03:28:22 +0000 (20:28 -0700)]
SME: Do not skip initial scan request

When SME is in wpa_supplicant (mac80211), we need to make sure that
the kernel code has valid BSS entry for the AP. In some cases it
seemed to be possible to end up not having current information in
cfg80211 or mac80211 which can result to association failures. Avoid
this by always running through the scan request before initial
connection attempt.

13 years agoSME: Retry scan after authentication failure
Jouni Malinen [Sun, 18 Jul 2010 03:27:19 +0000 (20:27 -0700)]
SME: Retry scan after authentication failure

This is needed to avoid getting stuck if driver fails authentication
request for some reason.

13 years agoVerify that l2_packet is initialized before notification call
Jouni Malinen [Sun, 18 Jul 2010 03:26:47 +0000 (20:26 -0700)]
Verify that l2_packet is initialized before notification call

It is possible that l2_packet is not used with wpa_supplicant
in some cases, so better make sure we do not end up notifying
l2_packet code about authentications unless it was actually
initialized in the first place.

13 years agoFix wpa_supplicant AP mode to ignore EAPOL Supplicant port callback
Jouni Malinen [Sun, 18 Jul 2010 03:25:41 +0000 (20:25 -0700)]
Fix wpa_supplicant AP mode to ignore EAPOL Supplicant port callback

This is needed to avoid setting EAPOL PAE port status incorrectly
when using wpa_supplicant to control AP mode operations.

13 years agoWPS: Add more debug info for DH keys
Jouni Malinen [Sun, 18 Jul 2010 03:23:55 +0000 (20:23 -0700)]
WPS: Add more debug info for DH keys

13 years agoFix a typo in Disassociation frame building
Jouni Malinen [Sun, 18 Jul 2010 03:23:20 +0000 (20:23 -0700)]
Fix a typo in Disassociation frame building

This did not really change any behavior since Deauthentication frame
uses the same format.

13 years agoDefine Public Action and Vendor-specific Public Action frames
Jouni Malinen [Sun, 18 Jul 2010 03:22:40 +0000 (20:22 -0700)]
Define Public Action and Vendor-specific Public Action frames

13 years agoIEEE 802.11u GAS defines
Jouni Malinen [Sun, 18 Jul 2010 03:21:39 +0000 (20:21 -0700)]
IEEE 802.11u GAS defines

13 years agonl80211: show TX status (ack) in debug log
Jouni Malinen [Sun, 18 Jul 2010 03:17:43 +0000 (20:17 -0700)]
nl80211: show TX status (ack) in debug log

13 years agoFT: Fix RRB messages to use correct endianness
Jouni Malinen [Sun, 18 Jul 2010 00:48:32 +0000 (17:48 -0700)]
FT: Fix RRB messages to use correct endianness

The pairwise cipher field is supposed to be little endian, but the
message building functions did not swap the bytes on big endian
hosts while the message processing functions did. Fix this by using
little endian byte order in both places.

13 years agobgscan learn: Remove forgotten debug printf
Jouni Malinen [Sun, 11 Jul 2010 02:59:31 +0000 (19:59 -0700)]
bgscan learn: Remove forgotten debug printf

13 years agobgscan learn: Mark BSSes that show up in the same scan as neighbors
Jouni Malinen [Sun, 11 Jul 2010 01:33:22 +0000 (18:33 -0700)]
bgscan learn: Mark BSSes that show up in the same scan as neighbors

13 years agobgscan learn: Probe one new channel at a time to find APs
Jouni Malinen [Sun, 11 Jul 2010 01:09:41 +0000 (18:09 -0700)]
bgscan learn: Probe one new channel at a time to find APs

This allows APs to be found from channels that have not previously
been observed to contain APs for this ESS.

13 years agobgscan learn: Learn BSS information based on previous scans
Jouni Malinen [Sun, 11 Jul 2010 00:41:16 +0000 (17:41 -0700)]
bgscan learn: Learn BSS information based on previous scans

Store list of all discovered BSSes in the ESS and on which frequencies
they have been seen. Use this information to dynamically generated the
list of channels for background scans.

13 years agobgscan learn: Add data file for storing learned network information
Jouni Malinen [Sat, 10 Jul 2010 23:05:31 +0000 (16:05 -0700)]
bgscan learn: Add data file for storing learned network information

13 years agobgscan: Add starting point for more advanced bgscan module: learn
Jouni Malinen [Sat, 10 Jul 2010 22:55:48 +0000 (15:55 -0700)]
bgscan: Add starting point for more advanced bgscan module: learn

This is based on the bgscan "simple" module and this initial commit
does not add any new functionality.

13 years agobgscan: Provide scan results to the notify_scan handler
Jouni Malinen [Sat, 10 Jul 2010 22:43:44 +0000 (15:43 -0700)]
bgscan: Provide scan results to the notify_scan handler

13 years agoFix bgscan stopping after dissassociation
Sam Leffler [Sat, 10 Jul 2010 21:43:48 +0000 (14:43 -0700)]
Fix bgscan stopping after dissassociation

Clear bgscan_ssid on disassoc event so bgscan is initialized the next
time we reach COMPLETED state.

13 years agoWPS: Add a workaround for OS X 10.6.3 and .4 (use PSK, not passphrase)
Jouni Malinen [Mon, 5 Jul 2010 22:37:47 +0000 (15:37 -0700)]
WPS: Add a workaround for OS X 10.6.3 and .4 (use PSK, not passphrase)

It looks like 10.6.3 and 10.6.4 do not like to receive Network Key
with WPA passphrase while PSK format still works. Use peer information
from M1 to figure out whether the Enrollee is likely to be OS X and
if so, force PSK format to be used for Network Key.

13 years agoWPS: Add a workaround for parsing M1 from OS X 10.6
Jouni Malinen [Mon, 5 Jul 2010 20:04:54 +0000 (13:04 -0700)]
WPS: Add a workaround for parsing M1 from OS X 10.6

It looks like Mac OS X adds unexpected 0x00 padding to the end of M1.
Skip that padding to avoid interop issues.

13 years agoAdd new debug message level for excessive information
Jouni Malinen [Mon, 5 Jul 2010 19:21:48 +0000 (12:21 -0700)]
Add new debug message level for excessive information

Some frequent debug prints are of limited use and make debug output
difficult to read. Make them use a new debug level so that -dd
provides more readable output (-ddd can now be used to enable
the excessive debug prints).

13 years agoOpenSSL: Fix public key length in DH group 5 operations
Jouni Malinen [Sun, 27 Jun 2010 04:03:25 +0000 (21:03 -0700)]
OpenSSL: Fix public key length in DH group 5 operations

The length of the prime was used incorrectly and this resulted
in WPS DH operation failing whenever the public key ended up having
leading zeros (i.e., about every 1/256th time).

13 years agoWPS: Use different scan result sorting rules when doing WPS provisioning
Jouni Malinen [Fri, 11 Jun 2010 20:50:13 +0000 (13:50 -0700)]
WPS: Use different scan result sorting rules when doing WPS provisioning

The AP configuration may change after provisioning, so it is better
not to use the current security policy to prioritize results. Instead,
use WPS Selected Registrar attribute as the main sorting key and use
signal strength next without considering security policy or rate sets.
The non-WPS provisioning case remains as-is, i.e., this change applies
only when trying to find an AP for WPS provisioning.

13 years agoShow signal level and WPS support in scan results debug dump
Jouni Malinen [Fri, 11 Jun 2010 20:47:33 +0000 (13:47 -0700)]
Show signal level and WPS support in scan results debug dump

This makes it easier to debug AP selection for WPS provisioning.

13 years agoWPS: Add workaround for missing Network Key attribute
Jouni Malinen [Fri, 11 Jun 2010 18:29:10 +0000 (11:29 -0700)]
WPS: Add workaround for missing Network Key attribute

Some deployed implementations do not include the mandatory Network
Key attribute when a WPS Credential is for an open network. Allow
this to improve interoperability since the actual key value is not
really needed for open networks.

13 years agoFix scan_runs counting
Jouni Malinen [Fri, 11 Jun 2010 18:15:16 +0000 (11:15 -0700)]
Fix scan_runs counting

Addition of the background scanning mechanism in commit
60b94c9819199c0427e623080ebae27fe44be6b5 moved the scan trigger
into a new function that was also incrementing the scan_runs
counter, but the removal of the previous scan_runs incrementation
was forgotten from that patch. This counter should only be updated
into a single location, so remove the old one. This improves AP
selection for WPS provisioning by not skipping some of the initial
scans.

13 years agoWPS: Do not proxy Probe Request frames to foreign SSIDs to Registrars
Jouni Malinen [Fri, 11 Jun 2010 05:36:34 +0000 (22:36 -0700)]
WPS: Do not proxy Probe Request frames to foreign SSIDs to Registrars

We must only indicate stations that are either probing the wildcard SSID
or our own SSID.

13 years agorfkill: Use rtnetlink ifup/ifdown events
Jouni Malinen [Mon, 31 May 2010 15:00:27 +0000 (18:00 +0300)]
rfkill: Use rtnetlink ifup/ifdown events

Replace use of rfkill block event with rtnetlink ifdown. This makes
the design more robust since the rfkill event could have been for
another interface while the rtnetlink events are already filtered
based of ifindex. In addition, the new design handles other than
rfkill-triggered ifdown/ifup events, too. rfkill unblocked event
is still needed to try to set the interface back up. If the unblock
was for another interface, ifup will fail and the driver state is
not changed.

13 years agoFix driver operation order in configuration reloading
Jouni Malinen [Sat, 29 May 2010 19:27:27 +0000 (22:27 +0300)]
Fix driver operation order in configuration reloading

Some of the driver wrappers need to get set_ieee8021x() call before
they can configure keys. Reorder the operations in the reloading
of configuration case to match with that expectation.

13 years agoeloop: Fix crash on signal handler cancelling next timeout
Jouni Malinen [Fri, 28 May 2010 19:18:28 +0000 (22:18 +0300)]
eloop: Fix crash on signal handler cancelling next timeout

It is possible that the timeout pointer becomes invalid in one of the
signal handlers, so we need to reload the pointer after those.

13 years agoatheros: Fix WPA/802.1X disabling to clear Privacy flag
Jouni Malinen [Fri, 28 May 2010 18:51:31 +0000 (21:51 +0300)]
atheros: Fix WPA/802.1X disabling to clear Privacy flag

Setting IEEE80211_PARAM_AUTHMODE to IEEE80211_AUTH_AUTO ends up enabling
Privacy mode in the driver. We need to clear that to allow hostapd to be
reconfigured into open mode.

13 years agoWPS ER: Add command for configuring an AP
Jouni Malinen [Thu, 27 May 2010 21:01:48 +0000 (00:01 +0300)]
WPS ER: Add command for configuring an AP

wps_er_config can now be used to configure an AP. It is similar to
wps_er_learn, but instead of only learning the current AP settings,
it continues to send M8 with the new settings for the AP.

13 years agoWPS ER: Add initial documentation for External Registrar functionality
Jouni Malinen [Thu, 27 May 2010 12:25:18 +0000 (15:25 +0300)]
WPS ER: Add initial documentation for External Registrar functionality

13 years agoWPS ER: Add ctrl_iface event for learned AP settings
Jouni Malinen [Thu, 27 May 2010 12:24:45 +0000 (15:24 +0300)]
WPS ER: Add ctrl_iface event for learned AP settings

13 years agoWPS ER: Allow AP filtering based on IP address
Jouni Malinen [Thu, 27 May 2010 12:23:55 +0000 (15:23 +0300)]
WPS ER: Allow AP filtering based on IP address

wps_er_start command now takes an optional parameter that can be used
to configure a filter to only allow UPnP SSDP messages from the
specified IP address. In practice, this limits the WPS ER operations
to a single AP and filters out all other devices in the network.

13 years agoWPS ER: Fix Credential to use correct Enrollee MAC Address
Jouni Malinen [Thu, 27 May 2010 12:22:44 +0000 (15:22 +0300)]
WPS ER: Fix Credential to use correct Enrollee MAC Address

When starting the protocol run with an Enrollee, clone the AP Settings
and replace the AP MAC Address with the Enrollee MAC Address so that the
correct value is then used in the Credential attribute in M8.

13 years agoAdd WPS IE into (Re)Association Response frame if WPS is used
Jouni Malinen [Wed, 26 May 2010 15:46:08 +0000 (18:46 +0300)]
Add WPS IE into (Re)Association Response frame if WPS is used

If the associating station indicates that it is intents to use WPS
by including WPS IE in (Re)Association Request frame, include WPS IE
in (Re)Association Response frame.

13 years agoReassemble WPS IE(s) in (Re)Association Request if needed
Jouni Malinen [Wed, 26 May 2010 15:17:13 +0000 (18:17 +0300)]
Reassemble WPS IE(s) in (Re)Association Request if needed

Use a function that will take care of possible (though, very unlikely)
fragmentation of WPS TLVs in (Re)Association Request frames.

13 years agoFix WPS attribute parser to use correct pointer for Response Type
Jouni Malinen [Wed, 26 May 2010 14:12:30 +0000 (17:12 +0300)]
Fix WPS attribute parser to use correct pointer for Response Type

13 years agoInternal TLS: Fix X.509 name handling to use sequency of attributes
Jouni Malinen [Tue, 25 May 2010 17:55:29 +0000 (20:55 +0300)]
Internal TLS: Fix X.509 name handling to use sequency of attributes

There may be more than one attribute of same type (e.g., multiple DC
attributes), so the code needs to be able to handle that. Replace the
fixed structure with an array of attributes.

13 years agoInternal TLS: Add domainComponent parser for X.509 names
Jouni Malinen [Tue, 25 May 2010 16:43:21 +0000 (19:43 +0300)]
Internal TLS: Add domainComponent parser for X.509 names

13 years agoFix memory leak on rfkill init error path
Jouni Malinen [Tue, 25 May 2010 09:06:25 +0000 (12:06 +0300)]
Fix memory leak on rfkill init error path

13 years agoFix a typo in unused attribute name
Jouni Malinen [Tue, 25 May 2010 06:57:22 +0000 (09:57 +0300)]
Fix a typo in unused attribute name

13 years agoSkip D-Bus signals if the dbus_path is not yet set
Jouni Malinen [Sun, 23 May 2010 17:23:11 +0000 (20:23 +0300)]
Skip D-Bus signals if the dbus_path is not yet set

This avoids an invalid D-Bus call during interface initialization.
The wpa_state change can happen before the D-Bus interface is set up,
so we must be preparted to handle this early event signal. In theory,
it should be possible to reorder initialization code to make sure
D-Bus signals are ready, but that would likely require quite a bit of
code restructuring, so it looks like a safer option for now is to just
skip the early event.

13 years agobsd: Use set_freq() API for AP mode wpa_supplicant
Masashi Honma [Sun, 23 May 2010 09:20:33 +0000 (12:20 +0300)]
bsd: Use set_freq() API for AP mode wpa_supplicant

Previous version driver_bsd.c switches the channel in
wpa_driver_bsd_associate(). This patch changes it to use set_freq().
I have tested this patch on FreeBSD 8.0/NetBSD 5.0.2 with hostapd,
wpa_supplicant(AP) and wpa_supplicant(STA).

13 years agoFix CONFIG_AP=y build without CONFIG_IEEE8021X_EAPOL=y
Jouni Malinen [Sun, 23 May 2010 09:18:47 +0000 (12:18 +0300)]
Fix CONFIG_AP=y build without CONFIG_IEEE8021X_EAPOL=y

13 years agoFix: AP mode wpa_supplicant build
Masashi Honma [Sun, 23 May 2010 09:12:40 +0000 (12:12 +0300)]
Fix: AP mode wpa_supplicant build

The wpa_supplicant compilation with CONFIG_AP option and without
CONFIG_IEEE80211R, CONFIG_WPS, NEED_SME, CONFIG_CLIENT_MLME options
results in following messages.

../src/ap/drv_callbacks.o: In function `hostapd_notif_assoc':
../src/ap/drv_callbacks.c:59: undefined reference to
`ieee802_11_parse_elems'
gmake: *** [wpa_supplicant] Error 1

13 years agoAdd Linux rfkill support
Jouni Malinen [Sun, 23 May 2010 07:27:32 +0000 (10:27 +0300)]
Add Linux rfkill support

Add a new wpa_supplicant state: interface disabled. This can be used
to allow wpa_supplicant to be running with the network interface even
when the driver does not actually allow any radio operations (e.g.,
due to rfkill).

Allow driver_nl80211.c and driver_wext.c to start while rfkill is in
blocked state (i.e., when ifconfig up fails) and process rfkill
events to block/unblock WLAN.

14 years agoUpdate WPS IE on hostapd reconfiguration
Andriy Tkachuk [Sun, 2 May 2010 08:21:19 +0000 (11:21 +0300)]
Update WPS IE on hostapd reconfiguration

This is needed to handle cases where WPS state may have changed and
hostapd is reloading its configuration.

14 years agowpa_gui-qt4: Fix network selection
Kel Modderman [Sun, 2 May 2010 08:17:13 +0000 (11:17 +0300)]
wpa_gui-qt4: Fix network selection

Use regular expression matches to see if input is not the (now translated?)
string "Select any network" and is a "<network id>: <ssid>" string or the
"all" keyword where that is applicable.

Signed-off-by: Kel Modderman <kel@otaku42.de>
14 years agoFix enabling of networks while another network is being used
Kel Modderman [Sun, 2 May 2010 08:08:03 +0000 (11:08 +0300)]
Fix enabling of networks while another network is being used

Enable a network block, even if there is a current configuration, if it
was disabled.

Signed-off-by: Kel Modderman <kel@otaku42.de>
14 years agohostapd: Reorder some IEs to get closer to IEEE 802.11 standard
Jouni Malinen [Sun, 2 May 2010 07:53:01 +0000 (10:53 +0300)]
hostapd: Reorder some IEs to get closer to IEEE 802.11 standard

Vendor-specific IEs are supposed to be in the end of the frame, so move
WMM into the end of Beacon, Probe Response, and (Re)Association Response
frames. In addition, move HT IEs to be later in (Re)Association
Response to match the correct order.

hostapd_eid_wpa() adds multiple IEs and the end result may not always be
correct. If WPA is enabled, WPA IE (vendor-specific) gets added in the
middle of the frame and not in the end. This would require a larger
change to spliut the IEs from WPA module into separate locations when
constructing Beacon and Probe Response frames. This is not yet addressed.

14 years agoFix fallback from failed PMKSA caching into full EAP authentication
Jouni Malinen [Sat, 1 May 2010 14:35:28 +0000 (17:35 +0300)]
Fix fallback from failed PMKSA caching into full EAP authentication

Commit 83935317a78fb4157eb6e5134527b9311dbf7b8c added forced
disconnection in case of 4-way handshake failures. However, it should
not have changed the case where the supplicant is requesting fallback
to full EAP authentication if the PMKID in EAPOL-Key message 1/4 is
not know. This case needs to send an EAPOL-Start frame instead of
EAPOL-Key message 2/4.

This works around a problem with APs that try to force PMKSA caching
even when the client does not include PMKID in (re)association request
frame to request it. [Bug 355]

14 years agoFix EAPOL_SM_USES_WPA flag to be set correctly
Jouni Malinen [Sat, 1 May 2010 14:12:59 +0000 (17:12 +0300)]
Fix EAPOL_SM_USES_WPA flag to be set correctly

Commit c02d52b405fb017e1eec80082dbe433fec53d9c2 removed direct calls
to the WPA authenticator, but the change here was incorrect.
EAPOL_SM_USES_WPA was supposed to be set based on sta->wpa_sm being
set, i.e., no need to check for PMKSA entries for that.

While this could potentially change EAPOL Key TX state machine behavior,
no clear problems have been identified so far. Anyway, better fix this
to get the correct flags set for EAPOL authenticator state machine.

14 years agoFix WPA state machine initialization on WPA_REAUTH if needed
Jouni Malinen [Fri, 23 Apr 2010 13:49:50 +0000 (16:49 +0300)]
Fix WPA state machine initialization on WPA_REAUTH if needed

When using WPS, we may end up here if the STA manages to re-associate
without the previous STA entry getting removed. Consequently, we need to
make sure that the WPA state machines gets initialized properly at this
point.

14 years agohostap.git is now 0.8.x development tree
Jouni Malinen [Sun, 18 Apr 2010 18:01:00 +0000 (21:01 +0300)]
hostap.git is now 0.8.x development tree

0.7.x for branched into hostap-07.git for stable releases.

14 years agoAdd wpa_gui-qt4 translation files into build hostap_0_7_2
Jouni Malinen [Sun, 18 Apr 2010 16:15:07 +0000 (19:15 +0300)]
Add wpa_gui-qt4 translation files into build

14 years agowpa_gui: lupdate run before release
Jouni Malinen [Sun, 18 Apr 2010 16:08:14 +0000 (19:08 +0300)]
wpa_gui: lupdate run before release

14 years agowpa_gui: Fix Windows build
Jouni Malinen [Sun, 18 Apr 2010 16:06:24 +0000 (19:06 +0300)]
wpa_gui: Fix Windows build

14 years agoPreparations for 0.7.2 release
Jouni Malinen [Sun, 18 Apr 2010 15:02:34 +0000 (18:02 +0300)]
Preparations for 0.7.2 release

14 years agoTNC: Add more debug infor to EAP-TNC server state changes
Jouni Malinen [Sun, 18 Apr 2010 09:24:02 +0000 (12:24 +0300)]
TNC: Add more debug infor to EAP-TNC server state changes

14 years agoTNC: Fix EAP-TNC fragmentation of the last message
Jouni Malinen [Sun, 18 Apr 2010 09:21:56 +0000 (12:21 +0300)]
TNC: Fix EAP-TNC fragmentation of the last message

62477841a18233586e352d7b901addf18abc1d8a tried to address fragmentation
issues, but it did not address the case where the final EAP-TNC
message gets fragmented. Move the state update to the correct place
to address this case, too.

14 years agoTNCS: Fix uninit in error case to not double free IMVs
Jouni Malinen [Sun, 18 Apr 2010 08:10:46 +0000 (11:10 +0300)]
TNCS: Fix uninit in error case to not double free IMVs

14 years agoWPS: Include CONFIG_EAP automatically if WPS is enabled
Jouni Malinen [Sat, 17 Apr 2010 19:05:18 +0000 (22:05 +0300)]
WPS: Include CONFIG_EAP automatically if WPS is enabled

14 years agoatheros: Restore ATH_WPS_IE definition and comment
Jouni Malinen [Sat, 17 Apr 2010 18:47:13 +0000 (21:47 +0300)]
atheros: Restore ATH_WPS_IE definition and comment

14 years agoatheros: Add more robust and complete debug info for ioctl failures
Jouni Malinen [Sat, 17 Apr 2010 18:45:34 +0000 (21:45 +0300)]
atheros: Add more robust and complete debug info for ioctl failures

14 years agoatheros: Update to build with the current driver version
Jouni Malinen [Sat, 17 Apr 2010 18:04:26 +0000 (21:04 +0300)]
atheros: Update to build with the current driver version

14 years agoFix build without CONFIG_FULL_DYNAMIC_VLAN
Jouni Malinen [Sat, 17 Apr 2010 18:01:35 +0000 (21:01 +0300)]
Fix build without CONFIG_FULL_DYNAMIC_VLAN

14 years agoSupport for Solaris default shell restriction
Masashi Honma [Sat, 17 Apr 2010 14:15:23 +0000 (17:15 +0300)]
Support for Solaris default shell restriction

Some shells (like Solaris default /bin/sh) doesn't allow -e
option for file existence check. Use -f instead.

14 years agoRemove unnecessary SUBDIRS loops from src/*/Makefile
Jouni Malinen [Sat, 17 Apr 2010 14:10:31 +0000 (17:10 +0300)]
Remove unnecessary SUBDIRS loops from src/*/Makefile

There are no subdirectories in any of these directories or plans
for adding ones. As such, there is no point in running the loop
that does not do anything and can cause problems with some shells.

14 years agoVLAN: Reorder init to get same behavior for all VLAN interfaces
Jouni Malinen [Sat, 17 Apr 2010 06:48:27 +0000 (09:48 +0300)]
VLAN: Reorder init to get same behavior for all VLAN interfaces

Both the wildcard VLAN entry and the statically configured VLAN
interfaces should behave in the same way. Initializing the
full dynamic VLAN code before adding the statically configured VLAN
interfaces allows the same processing to be applied to both statically
and dynamically added VLAN interface (i.e., also the statically
configured ones will be added to a bridge).

14 years agoVLAN: Set statically configured VLAN interfaces up
Jouni Malinen [Sat, 17 Apr 2010 06:45:18 +0000 (09:45 +0300)]
VLAN: Set statically configured VLAN interfaces up

This is needed to be able to bind stations to them with mac80211.

14 years agoDo not trigger initial scan if there are no enabled networks
Jouni Malinen [Fri, 16 Apr 2010 15:56:23 +0000 (18:56 +0300)]
Do not trigger initial scan if there are no enabled networks

This allows wpa_supplicant to be started quickly with an empty
configuration. If an external program wants to fetch scan results
from wpa_supplicant, it will need to request a scan explicitly
in this type of case.

14 years agonl80211: Fix wpa_supplicant build
Jouni Malinen [Fri, 16 Apr 2010 11:13:27 +0000 (14:13 +0300)]
nl80211: Fix wpa_supplicant build

14 years agoVLAN: Fix bridge interface clean up for no tagged_interface case
Jouni Malinen [Thu, 15 Apr 2010 22:13:46 +0000 (01:13 +0300)]
VLAN: Fix bridge interface clean up for no tagged_interface case

14 years agoVLAN: Decrease bridge forwarding delay to avoid EAPOL timeouts
M. Braun [Thu, 15 Apr 2010 21:48:32 +0000 (00:48 +0300)]
VLAN: Decrease bridge forwarding delay to avoid EAPOL timeouts

14 years agonl80211: Fix initial add_ifidx() realloc to not forget values
M. Braun [Thu, 15 Apr 2010 21:39:59 +0000 (00:39 +0300)]
nl80211: Fix initial add_ifidx() realloc to not forget values

We need to make a copy of the old entries the first time the
if_indices buffer gets allocated.

14 years agonl80211: Add bridge interfaces to own ifindex list automatically
M. Braun [Thu, 15 Apr 2010 21:36:33 +0000 (00:36 +0300)]
nl80211: Add bridge interfaces to own ifindex list automatically

Whenever our own interface is added to a bridge, add that bridge
into the list of own interfaces.

14 years agoVLAN: Set dynamic VLAN up to fix STA bind and key setup
M. Braun [Thu, 15 Apr 2010 20:54:41 +0000 (23:54 +0300)]
VLAN: Set dynamic VLAN up to fix STA bind and key setup