libeap.git
7 years agoMerge branch 'moonshot' of ssh://moonshot.suchdamage.org:822/srv/git/libeap into... moonshot
Luke Howard [Thu, 17 Nov 2011 08:32:47 +0000 (19:32 +1100)]
Merge branch 'moonshot' of ssh://moonshot.suchdamage.org:822/srv/git/libeap into moonshot

Conflicts:
Makefile.am

7 years agolink against OpenSSL backend
Luke Howard [Thu, 17 Nov 2011 05:37:06 +0000 (16:37 +1100)]
link against OpenSSL backend

8 years agomake dist: distribute sources
Sam hartman [Fri, 16 Sep 2011 18:40:41 +0000 (19:40 +0100)]
make dist: distribute sources

Distribute enough sources that a tar includes a set sufficient to build

8 years agoUnbreak TTLS by compiling with -DCONFIG_TLS_INTERNAL_CLIENT
Luke Howard [Tue, 3 May 2011 14:53:46 +0000 (16:53 +0200)]
Unbreak TTLS by compiling with -DCONFIG_TLS_INTERNAL_CLIENT

8 years agoinclude missing objects for functioning libeap.a
Luke Howard [Wed, 27 Apr 2011 15:12:58 +0000 (17:12 +0200)]
include missing objects for functioning libeap.a

8 years agoremove CONFIG_FIPS substitutions when building md5-non-fips.c
Luke Howard [Wed, 27 Apr 2011 14:57:15 +0000 (16:57 +0200)]
remove CONFIG_FIPS substitutions when building md5-non-fips.c

8 years agoautomake build system
Sam Hartman [Tue, 26 Apr 2011 15:27:45 +0000 (11:27 -0400)]
automake build system

Provide an automake build system to generate an libeap convenience
library for moonshot

8 years agoMerge branch 'moonshot' of ssh://moonshot.suchdamage.org:822/srv/git/libeap into...
Luke Howard [Tue, 15 Mar 2011 02:25:07 +0000 (13:25 +1100)]
Merge branch 'moonshot' of ssh://moonshot.suchdamage.org:822/srv/git/libeap into moonshot

8 years agoFix unused parameter warning when building mech_eap
Luke Howard [Tue, 15 Mar 2011 02:24:08 +0000 (13:24 +1100)]
Fix unused parameter warning when building mech_eap

8 years agoMinimal build system for eap library
Sam Hartman [Tue, 8 Mar 2011 02:36:17 +0000 (21:36 -0500)]
Minimal build system for eap library
force -fPIC

8 years agoMake peer headers build with C++ sources
Luke Howard [Tue, 19 Oct 2010 13:06:12 +0000 (00:06 +1100)]
Make peer headers build with C++ sources

8 years agoWPS: Do not drop subscriptions based on max queue length origin/HEAD origin/master
Jouni Malinen [Sun, 17 Oct 2010 18:36:04 +0000 (21:36 +0300)]
WPS: Do not drop subscriptions based on max queue length

UPnP event subscriptions are not supposed to be dropped based on
whether events can be delivered quickly enough. Leave dropping to
happen only based on failed deliveries to avoid issues with a burst
of events kicking out still active subscribers.

8 years agoWPS UPnP: Add more priority for queuing EAP events
Jouni Malinen [Sun, 17 Oct 2010 18:30:25 +0000 (21:30 +0300)]
WPS UPnP: Add more priority for queuing EAP events

8 years agoWPS UPnP: Throttle WLANEvent notifications to 5 per second
Jouni Malinen [Sun, 17 Oct 2010 18:24:12 +0000 (21:24 +0300)]
WPS UPnP: Throttle WLANEvent notifications to 5 per second

Do not send more than five Probe Request WLANEvent notifications
per second. Even though the limit should in theory apply to all
WLANEvents, it is better not to drop EAP notifications because
of Probe Request frames and really, the only real reason for
event bursts is Probe Request frames.

8 years agoWPS: Limit Probe Request event queuing if subscriber may have left
Jouni Malinen [Sun, 17 Oct 2010 17:58:58 +0000 (20:58 +0300)]
WPS: Limit Probe Request event queuing if subscriber may have left

Instead of queuing all events for a subscriber, only queue more
important events if delivery of event notifications starts failing.
This allows more time for the subscriber to recover since the maximum
queue length if not reached because of Probe Request frames only.

8 years agoWPS: Schedule sending of pending events after failure
Jouni Malinen [Sun, 17 Oct 2010 17:57:11 +0000 (20:57 +0300)]
WPS: Schedule sending of pending events after failure

There is no point leaving these pending events waiting for something
new to trigger us to continue.

8 years agoWPS: Separate local error from max queue length reached
Jouni Malinen [Sun, 17 Oct 2010 17:29:28 +0000 (20:29 +0300)]
WPS: Separate local error from max queue length reached

Drop subscription only if the max queue length has been reached;
not based on any error.

8 years agoWPS UPnP: Improved event notification failure processing
Jouni Malinen [Sun, 17 Oct 2010 17:26:03 +0000 (20:26 +0300)]
WPS UPnP: Improved event notification failure processing

Instead of dropping the subscription on first failure, allow up to
10 failures before dropping. In addition, drop the callback URLs
one by one instead of full subscription if only one URL is failing.

8 years agoWPS: Convert assert() to error return
Jouni Malinen [Sun, 17 Oct 2010 17:23:51 +0000 (20:23 +0300)]
WPS: Convert assert() to error return

8 years agoWPS UPnP: Fix memory leak on retry case
Jouni Malinen [Sun, 17 Oct 2010 17:22:03 +0000 (20:22 +0300)]
WPS UPnP: Fix memory leak on retry case

The event entry needs to be freed when giving up on retries.

8 years agoWPS: Add more debug info for UPnP operations
Jouni Malinen [Sun, 17 Oct 2010 17:20:28 +0000 (20:20 +0300)]
WPS: Add more debug info for UPnP operations

8 years agoWPS: Remove unused define
Jouni Malinen [Sun, 17 Oct 2010 17:15:08 +0000 (20:15 +0300)]
WPS: Remove unused define

This timeout value was moved to now separate HTTP client implementation.

8 years agoWPS: Cleaned up URL parser not to modify const buffer
Jouni Malinen [Sun, 17 Oct 2010 17:12:54 +0000 (20:12 +0300)]
WPS: Cleaned up URL parser not to modify const buffer

There is no need to use '\0' termination here in string parsing,
so we may as well clean this up to follow the const declaration.

8 years agoWPS: Drop subscription if it does not have any valid callback address
Jouni Malinen [Sun, 17 Oct 2010 17:11:03 +0000 (20:11 +0300)]
WPS: Drop subscription if it does not have any valid callback address

8 years agoWPS: Remove unused error path code
Jouni Malinen [Sun, 17 Oct 2010 17:10:09 +0000 (20:10 +0300)]
WPS: Remove unused error path code

8 years agoWPS UPnP: Fix HTTP client timeout event code
Jouni Malinen [Sun, 17 Oct 2010 17:07:33 +0000 (20:07 +0300)]
WPS UPnP: Fix HTTP client timeout event code

The define here was overriding the event code enum value and that
resulted in incorrect code being used and WPS UPnP code ignoring the
timeout events.

8 years agoWPS: Add virtual flags in Config Methods for WPS 2.0 if needed
Jouni Malinen [Sat, 16 Oct 2010 09:57:47 +0000 (12:57 +0300)]
WPS: Add virtual flags in Config Methods for WPS 2.0 if needed

This is a workaround for incorrect configuration (missing
virtual/physical identifier for config methods) for WPS 2.0 to
allow unmodified configuration from WPS 1.0 to be used while
enforcing compliant WPS 2.0 values.

8 years agoFix build with drivers that use driver_wext.c
Jouni Malinen [Fri, 15 Oct 2010 19:11:33 +0000 (22:11 +0300)]
Fix build with drivers that use driver_wext.c

If CONFIG_DRIVER_WEXT=y is not used in .config, but driver_wext.c
gets pull in to help another driver wrapper, rfkill code needs to
included to fix the build.

8 years agonl80211: Indicate channel list change events
Jouni Malinen [Fri, 15 Oct 2010 15:56:36 +0000 (18:56 +0300)]
nl80211: Indicate channel list change events

Listen to regulatory event messages from kernel and convert them to
internal driver event notifications indicated that the channel list
may have changed.

8 years agoP2P: Add mechanism for updating P2P channel list based on driver events
Jouni Malinen [Fri, 15 Oct 2010 15:55:22 +0000 (18:55 +0300)]
P2P: Add mechanism for updating P2P channel list based on driver events

This allows P2P channel list to be updated whenever the driver changes
its list of allowed channels, e.g., based on country code from scan
results.

8 years agoP2P: Set channel list per channel instead of per band
Jouni Malinen [Fri, 15 Oct 2010 15:51:37 +0000 (18:51 +0300)]
P2P: Set channel list per channel instead of per band

This makes the channel list match with driver capabilities without
having to do workaround like disabling channels 12-14.

8 years agoP2P: Verify that forced channel is suitable for autonomous GO
Jouni Malinen [Fri, 15 Oct 2010 15:46:02 +0000 (18:46 +0300)]
P2P: Verify that forced channel is suitable for autonomous GO

8 years agoP2P: Send AP mode WPS-FAIL event to parent interface
Anil Gathala Sudha [Thu, 14 Oct 2010 17:57:00 +0000 (20:57 +0300)]
P2P: Send AP mode WPS-FAIL event to parent interface

The AP operation with wpa_supplicant requires an additional callback
to get the needed event information from hostapd side so that
wpa_msg() can be called for wpa_s->parent if needed.

8 years agoP2P: Send WPS-FAIL event to parent interface, too
Jouni Malinen [Thu, 14 Oct 2010 17:52:31 +0000 (20:52 +0300)]
P2P: Send WPS-FAIL event to parent interface, too

This makes it easier to figure out what went wrong during group
formation when per-group interfaces are used.

8 years agoWPS: Add WPS-FAIL ctrl_interface event for hostapd
Jouni Malinen [Thu, 14 Oct 2010 17:50:46 +0000 (20:50 +0300)]
WPS: Add WPS-FAIL ctrl_interface event for hostapd

8 years agoWPS: Add Config Error into WPS-FAIL events
Jouni Malinen [Thu, 14 Oct 2010 17:49:54 +0000 (20:49 +0300)]
WPS: Add Config Error into WPS-FAIL events

This makes it easier to figure out what could have failed in the
WPS protocol and potentially provide more information for the
user on how to resolve the issue.

8 years agoP2P: Reject multi-channel concurrent operations depending on driver
Jouni Malinen [Thu, 14 Oct 2010 11:24:56 +0000 (14:24 +0300)]
P2P: Reject multi-channel concurrent operations depending on driver

The driver wrapper can now indicate whether the driver supports
concurrent operations on multiple channels (e.g., infra STA connection
on 5 GHz channel 36 and P2P group on 2.4 GHz channel 1). If not,
P2P_CONNECT commands will be rejected if they would require
multi-channel concurrency.

The new failure codes for P2P_CONNECT:

FAIL-CHANNEL-UNAVAILABLE:
The requested/needed channel is not currently available (i.e., user has
an option of disconnecting another interface to make the channel
available).

FAIL-CHANNEL-UNSUPPORTED:
The request channel is not available for P2P.

8 years agoP2P: Share code for p2p_connect/authorize channel preparation
Jouni Malinen [Thu, 14 Oct 2010 09:45:15 +0000 (12:45 +0300)]
P2P: Share code for p2p_connect/authorize channel preparation

8 years agoP2P: Verify that p2p_connect forced frequency is allowed for P2P
Jouni Malinen [Thu, 14 Oct 2010 09:39:40 +0000 (12:39 +0300)]
P2P: Verify that p2p_connect forced frequency is allowed for P2P

Do not accept forced frequency unless the specified channel is
allowed for P2P, i.e., is included in the local list of
advertised channels.

8 years agobgscan: Add new channel condition parameters to signal change events
Paul Stewart [Tue, 12 Oct 2010 17:03:36 +0000 (20:03 +0300)]
bgscan: Add new channel condition parameters to signal change events

bgscan modules can potentially get a richer feel for the channel
condition and make better choices about scan/no-scan and roam/no-roam.

8 years agonl80211: Add more details into signal change events
Paul Stewart [Tue, 12 Oct 2010 17:01:50 +0000 (20:01 +0300)]
nl80211: Add more details into signal change events

Add new survey retrieval function and add txrate to station into the
EVENT_SIGNAL_CHANGE events.

8 years agoP2P: Limit p2p_connect .. pbc join based on BSSID
Jouni Malinen [Tue, 12 Oct 2010 13:56:17 +0000 (16:56 +0300)]
P2P: Limit p2p_connect .. pbc join based on BSSID

Allow only the expected P2P Interface Address as the BSSID for
the AP to avoid selecting incorrect BSS should there be another
device that is advertising active PBC mode before the target
P2P GO does.

8 years agoWPS: Workaround broken Credential encoding from some D-Link APs
Jouni Malinen [Mon, 11 Oct 2010 13:07:49 +0000 (16:07 +0300)]
WPS: Workaround broken Credential encoding from some D-Link APs

At least D-Link DIR-600 and DIR-825 have been reported to include
an extra octet after the Network Key attribute within a Credential
attribute. This can happen at least when they are provisioning an
open network.

Add a workaround to detect this incorrectly encoded attribute and
to skip the extra octet when parsing such a Credential.

8 years agonl80211: Use nl80211 for Probe Request/Response frames
Johannes Berg [Sun, 10 Oct 2010 15:10:37 +0000 (18:10 +0300)]
nl80211: Use nl80211 for Probe Request/Response frames

The new nl80211 API means we don't need to use monitor interfaces. This
means that the P2P implementation now requires a kernel that has support
for generic management frame (not just Action frame) transmission.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agonl80211: Refactor Action frame TX
Johannes Berg [Sun, 10 Oct 2010 15:00:25 +0000 (18:00 +0300)]
nl80211: Refactor Action frame TX

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agonl80211: Use new frame registration API
Johannes Berg [Sun, 10 Oct 2010 14:55:18 +0000 (17:55 +0300)]
nl80211: Use new frame registration API

This is backward compatible since older kernels will ignore the extra
attribute and only allow registration for Action frames.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoP2P: Fix remain-on-channel abort race
Johannes Berg [Sun, 10 Oct 2010 14:52:13 +0000 (17:52 +0300)]
P2P: Fix remain-on-channel abort race

When the P2P state machine requests a remain- on-channel, there's a
potential race where it can then request a stop before the r-o-c has
actually started, in which case the stop will not be processed. Fix
that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agonl80211: support intra-BSS configuration
Johannes Berg [Sun, 10 Oct 2010 14:48:54 +0000 (17:48 +0300)]
nl80211: support intra-BSS configuration

Using the AP_ISOLATE nl80211 option, we can support intra-BSS
distribution configuration.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agonl80211: work around libnl bug
Johannes Berg [Sun, 10 Oct 2010 14:47:15 +0000 (17:47 +0300)]
nl80211: work around libnl bug

libnl has a bug, when binding more than two sockets and releasing one,
it will release the wrong address and then try to reuse it, which fails.
Therefore, we need to reimplement the socket address assignment logic
locally for libnl 1.1.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
8 years agoWPS: Fix WPS commands in wpa_supplicant AP mode
Jouni Malinen [Sun, 10 Oct 2010 14:43:42 +0000 (17:43 +0300)]
WPS: Fix WPS commands in wpa_supplicant AP mode

Commit 9290cc180040b77afbf3ccf088fb14d0121bc5b3 broke this by moving
to use for_each_interface() which is not available in wpa_supplicant
AP mode.

8 years agoP2P: Fix a typo to fix CONFIG_P2P=y build
Jouni Malinen [Sun, 10 Oct 2010 14:28:47 +0000 (17:28 +0300)]
P2P: Fix a typo to fix CONFIG_P2P=y build

Previous typo fix was missed here.

8 years agodbus_new_handlers: Don't send NULL to dbus_message_new_error
Paul Stewart [Sat, 9 Oct 2010 14:29:51 +0000 (17:29 +0300)]
dbus_new_handlers: Don't send NULL to dbus_message_new_error

The new DBus API helper function wpas_dbus_error_unknown_error
function can be called as a result of a failure within internal
getter calls, which will call this function with a NULL message
parameter.  However, dbus_message_new_error looks very unkindly
(i.e, abort()) on a NULL message, so in this case, we should not
call it.

I've observed this course of events during a call to
wpas_dbus_getter_bss_wpa with a faileld parse of the IE parameter.
We got here through a call to fill_dict_with_properties which
explicitly calls getters with a NULL message parameter.  Judging
from the way it is called, this could easily occur if an AP sends
out a malformed (or mis-received) probe response.  I usually run
into this problem while driving through San Francisco, so I'm
exposed to any number of base stations along this path.

8 years agodbus: Treat '' in SSIDs of Interface.Scan as a request for broadcast scan
Daniel Kurtz [Sat, 9 Oct 2010 13:27:53 +0000 (16:27 +0300)]
dbus: Treat '' in SSIDs of Interface.Scan as a request for broadcast scan

This patch changes wpa_supplicant policy for handling '' in SSIDs field of
Interface.SSID DBus message. It treats '' (zero-length) SSID as a request
for a broadcast scan, instead of ignoring it.

This patch updates DBus API .Scan() logic per the test cases listed below:

1) Interface.Scan({'Type':'active', 'Channel':(2412, 20)})
   Request:     Active scan with only '' SSID (1 channel)
   Should be:   1 broadcast ProbeRequest on specified channel
   Previous:    1 broadcast ProbeRequest on specified channel
   This Patch:  1 broadcast ProbeRequest on specified channel

2) Interface.Scan({'Type':'active', 'Channel':(2412, 20), 'SSIDs':['']})
   Request:     Active scan with only '' SSID (1 channel)
   Should be:   1 broadcast ProbeRequest on specified channel
   Previous:    No ProbeRequests; passive scan results for specified channel
   This Patch:  FIXED: 1 broadcast ProbeRequest on specified channel

3) Interface.Scan({'Type':'active', 'Channel':(2412, 20), 'SSIDs':['MySSID']})
   Request:     Active scan with only non-'' SSIDs (1 channel)
   Should be:   1 directed ProbeRequest for each SSID on specified channel,
no broadcast ProbeRequest
   Previous:    1 directed ProbeRequest for each SSID on specified channel,
no broadcast ProbeRequest
   This Patch:  1 directed ProbeRequest for each SSID on specified channel,
no broadcast ProbeRequest

4) Interface.Scan({'Type':'active', 'Channel':(2412, 20), 'SSIDs':['',
'MySSID']})
   Request:     Active scan with SSIDs, including 1 '' SSID (1 channel)
   Should be:   1 broadcast ProbeRequest, 1 directed ProbeRequest for each
non-'' SSID on specified channel
   Previous:    1 directed ProbeRequest for each non-'' SSID on specified
channel
   This Patch:  FIXED: 1 broadcast ProbeRequest, 1 directed ProbeRequest for
each non-'' SSID on specified channel

8 years agodbus: Fix passive/active scans in some cases
Daniel Kurtz [Sat, 9 Oct 2010 13:22:39 +0000 (16:22 +0300)]
dbus: Fix passive/active scans in some cases

Currently the DBus Interface.Scan API is counter-intuitive. It issues
ProbeRequests when doing passive scans when channels are specified, and
does not issue ProbeRequests for broadcast active scans.

This patch updates DBus API .Scan() logic per the test cases listed below:

 1) Interface.Scan({'Type':'passive'})
    Request:     Passive scan (all channels)
    Should be:   No ProbeRequests; Passive Scan results for all channels
    Previous:    1 ProbeRequest on all channels for both broadcast SSID and
selected network (scan_ssid=1)
    This Patch:  --No change--: 1 ProbeRequest on all channels for both
broadcast SSID and selected network (scan_ssid=1)

 2) Interface.Scan({'Type':'passive', 'Channel':(2412, 20)})
    Request:     Passive scan (1 channel)
    Should be:   No ProbeRequests; Passive Scan results for 1 channel
(plus overlapping channels)
    Previous:    1 broadcast ProbeRequest on specified channel
    This Patch:  --Fixed--: No ProbeRequests; Passive Scan results for 1
channel (plus overlapping channels)

 3) Interface.Scan({'Type':'active'})
    Request:     Active scan with no SSIDs (all channels)
    Should be:   1 broadcast ProbeRequest on all channels
    Previous:    No ProbeRequests;  passive scan results for all channels
    This Patch:  --Fixed--: 1 broadcast ProbeRequest on all channels

 4) Interface.Scan({'Type':'active', 'Channel':(2412, 20)})
    Request:     Active scan with no SSIDs (1 channel)
    Should be:   1 broadcast ProbeRequest on specified channel
    Previous:    No ProbeRequests; Passive scan results for specified
channel (plus overlapping channels)
    This Patch:  --Fixed--: 1 broadcast ProbeRequest on specified channel

8 years agonl80211: Sync with wireless-testing.git
Jouni Malinen [Sat, 9 Oct 2010 08:57:05 +0000 (11:57 +0300)]
nl80211: Sync with wireless-testing.git

8 years agoEAP server: Allow reauth to be started with passthrough
Jouni Malinen [Sat, 9 Oct 2010 05:53:45 +0000 (08:53 +0300)]
EAP server: Allow reauth to be started with passthrough

Some sequencies of EAPOL logoff/logon/start messages seem to be
able to get the previous implementation into state where hostapd
would not be able to start reauthentication when external
authentication server is used. The EAP server code would bypass
the initial Identity Request generation and EAPOL code would not
be able to send anything to the authentication server or supplicant
at that point. Work around this by forcing EAP server code to
start with Identity Request after INITIALIZE state even if the
Identity is known.

8 years agoP2P: Extend P2P manager functionality to work with driver MLME
Jouni Malinen [Fri, 8 Oct 2010 15:16:07 +0000 (18:16 +0300)]
P2P: Extend P2P manager functionality to work with driver MLME

Add P2P IE into Beacon, Probe Response, and (Re)Association Request
frames for drivers that generate this frames internally.

8 years agoP2P: Fix a typo in P2P manager definition
Jouni Malinen [Fri, 8 Oct 2010 15:15:38 +0000 (18:15 +0300)]
P2P: Fix a typo in P2P manager definition

8 years agoFix hostapd_cli get_config not to show key when WPA is disabled
Jouni Malinen [Fri, 8 Oct 2010 14:36:52 +0000 (17:36 +0300)]
Fix hostapd_cli get_config not to show key when WPA is disabled

Previously, incorrectly configured passphrase or group cipher type
could be shown even if WPA was disabled.

8 years agoApply WPS configuration changes to all interfaces that use WPS
Jouni Malinen [Fri, 8 Oct 2010 14:32:10 +0000 (17:32 +0300)]
Apply WPS configuration changes to all interfaces that use WPS

When a single hostapd process is controlling multiple interfaces,
apply the received or auto-generated configuration changes to all
interfaces that have enabled WPS.

8 years agoDisable AP PIN on all interfaces controlled by the same process
Jouni Malinen [Fri, 8 Oct 2010 14:24:58 +0000 (17:24 +0300)]
Disable AP PIN on all interfaces controlled by the same process

When a single hostapd process is used to manage multiple interfaces,
disable AP PIN on all interfaces if an attack is detected on any
interface.

8 years agoApply hostapd WPS commands to all interfaces on concurrent APs
Jouni Malinen [Fri, 8 Oct 2010 14:15:16 +0000 (17:15 +0300)]
Apply hostapd WPS commands to all interfaces on concurrent APs

When the same hostapd process is controlling multiple interfaces,
apply WPS commands (push button, add PIN, change AP PIN) to all
interfaces that are configured to use WPS.

8 years agoFix .gitignore files to not ignore subdirectory matches
Jouni Malinen [Thu, 7 Oct 2010 08:04:16 +0000 (11:04 +0300)]
Fix .gitignore files to not ignore subdirectory matches

The previous used .gitignore files were mathing some files that
were actually already in the repository (e.g.,
hostapd/logwatch/hostapd). Avoid this by listing the conflicting
entries in the root directory .gitignore with full path.

8 years agoAllow a postfix to be defined for the version number
Jouni Malinen [Thu, 7 Oct 2010 07:51:04 +0000 (10:51 +0300)]
Allow a postfix to be defined for the version number

A separate build number (etc.) version number postfix can now be
added to the build without having to modify source code files by
defining VERSION_STR_POSTFIX. This can be done, e.g., by adding
following line to .config:

CFLAGS += -DVERSION_STR_POSTFIX=\"-foo\"

8 years agoFix wpa_supplicant build without CONFIG_WPS and CONFIG_AP
Ben Greear [Thu, 7 Oct 2010 07:41:58 +0000 (10:41 +0300)]
Fix wpa_supplicant build without CONFIG_WPS and CONFIG_AP

8 years agoFix AP mode in wpa_supplicant with interface events
Johannes Berg [Wed, 6 Oct 2010 14:10:07 +0000 (17:10 +0300)]
Fix AP mode in wpa_supplicant with interface events

Needs to not trigger a scan here when the AP mode setup sets
interface down/up.

8 years agoFix wpa_supplicant AP mode with WPS not to crash
Jouni Malinen [Wed, 6 Oct 2010 13:46:43 +0000 (16:46 +0300)]
Fix wpa_supplicant AP mode with WPS not to crash

Commit 3379a3a795803335b3f464f34a15f06843369fb1 added a direct
iface->for_each_interface use without verification whether the
function is available. This works with hostapd, but not
wpa_supplicant (which crashes on segfault).

8 years agoFix build with CONFIG_WPS_OOB
Jouni Malinen [Wed, 6 Oct 2010 13:40:20 +0000 (16:40 +0300)]
Fix build with CONFIG_WPS_OOB

8 years agoFix AP mode 40 MHz pri/sec channel parsing in overlap determination
Jouni Malinen [Wed, 6 Oct 2010 11:09:44 +0000 (14:09 +0300)]
Fix AP mode 40 MHz pri/sec channel parsing in overlap determination

The previous implementation ended up incorrectly assuming that all
40 MHz use cases have secondary channel above the primary one. Fix this
by properly masking the secondary channel offset field and checking its
value.

8 years agoPreparations for 0.7.3 release
Jouni Malinen [Tue, 7 Sep 2010 16:48:50 +0000 (19:48 +0300)]
Preparations for 0.7.3 release

8 years agowext: Fix scan result signal levels when driver reports in dBm
David A Benjamin [Sun, 5 Sep 2010 16:04:10 +0000 (19:04 +0300)]
wext: Fix scan result signal levels when driver reports in dBm

wpa_supplicant showed signal levels incorrectly with some drivers:
Jun  6 16:29:36 rupert wpa_supplicant[18945]: Current BSS: 00:0d:97:11:40:d6
level=190
Jun  6 16:29:36 rupert wpa_supplicant[18945]: Selected BSS: 00:0d:97:11:50:09
level=192

Judging from output from other tools (iwlist) and the min_diff block
at the end of wpa_supplicant_need_to_roam, it seems these values
should actually be negative. Specifically, if one treats that number
as a signed char instead of unsigned, everything matches up.

To be honest, I've little to no understanding of wireless, but looking
at the source code for wireless-tools (iw_print_stats in iwlib.c), it
seems that the fields of the iw_quality struct need to be decoded
differently depending on various flags. I guess
src/drivers/driver_wext.c should have similar logic in
wext_get_scan_qual.

I wrote a patch that attempts to replicate some of that logic,
although it may be more complicated than is necessary; I think some of
the complexity is for backwards-compatibility, which might not be
necessary depending on wpa_supplicant's dependencies? In any case, it
is attached. Again, I don't know how any of this works, so it's likely
the patch is a bit off. But I think at least the logic to determine
min_diff in wpa_supplicant_need_to_roam would be more accurate if
level were determined correctly.

8 years agonl80211: Include linux/rtnetlink.h explicitly
Jouni Malinen [Thu, 30 Sep 2010 04:52:51 +0000 (21:52 -0700)]
nl80211: Include linux/rtnetlink.h explicitly

This is needed with libnl-tiny to get various definitions that
get included implicitly with libnl.

8 years agonl80211: Sync the header file with wireless-testing.git
Jouni Malinen [Thu, 30 Sep 2010 04:39:40 +0000 (21:39 -0700)]
nl80211: Sync the header file with wireless-testing.git

8 years agoatheros: Prefer WSC IE in (Re)Association Request frame
Jouni Malinen [Sat, 25 Sep 2010 00:01:03 +0000 (17:01 -0700)]
atheros: Prefer WSC IE in (Re)Association Request frame

This is needed to work properly with WPS stations that may include
both WPA/RSN IE and WSC IE when associating for WPS provisioning.

8 years agoWPS ER: Add more debug info on initialization errors
Jouni Malinen [Fri, 24 Sep 2010 23:05:58 +0000 (16:05 -0700)]
WPS ER: Add more debug info on initialization errors

8 years agoMark ctrl_iface RX debug for PING commands excessive
Jouni Malinen [Fri, 24 Sep 2010 22:50:13 +0000 (15:50 -0700)]
Mark ctrl_iface RX debug for PING commands excessive

This cleans up debug log from unnecessary entries when using
wpa_cli/hostapd_cli or other ctrl_iface monitors that PING
periodically to check connectivity.

8 years agoWPS: Documented wps_er_pin MAC address option
Jouni Malinen [Fri, 24 Sep 2010 22:44:26 +0000 (15:44 -0700)]
WPS: Documented wps_er_pin MAC address option

8 years agoWPS 2.0: Disable WPS if ignore_broadcast_ssid or WEP is used
Jouni Malinen [Fri, 24 Sep 2010 22:17:03 +0000 (15:17 -0700)]
WPS 2.0: Disable WPS if ignore_broadcast_ssid or WEP is used

These combinations are disallowed in WPS 2.0 (and do not work well
(or at all) with many deployed WPS 1.0 devices either).

8 years agoWPS ER: Make sure PIN timeout does not interrupt PBC operation
Jouni Malinen [Thu, 23 Sep 2010 21:45:55 +0000 (14:45 -0700)]
WPS ER: Make sure PIN timeout does not interrupt PBC operation

We need to clear the selected registrar timeout from wps_er_learn
when stopping the protocol run at M7 (previously, this was done only
when WSC_Done was being processed). In addition, we need to cancel
the timeout when a new PBC operation is started.

8 years agoWPS: Add hostapd_cli get_config command
Jouni Malinen [Thu, 23 Sep 2010 19:02:28 +0000 (12:02 -0700)]
WPS: Add hostapd_cli get_config command

This can be used by a WPS UI to display the current AP configuration.

8 years agoWPS: Add wps_check_pin command for processing PIN from user input
Jouni Malinen [Thu, 23 Sep 2010 17:30:52 +0000 (10:30 -0700)]
WPS: Add wps_check_pin command for processing PIN from user input

UIs can use this command to process a PIN entered by a user and to
validate the checksum digit (if present).

8 years agoWPS: Fix hostapd reconfig to update WPS UPnP string pointers
Jouni Malinen [Thu, 23 Sep 2010 02:34:32 +0000 (19:34 -0700)]
WPS: Fix hostapd reconfig to update WPS UPnP string pointers

This is needed to update the pointers maintained within WPS code
to use the new configuration data instead of maintaining pointers
to the old configuration which will be freed. This fixes strings in
UPnP discovery after reconfig (they used to be random freed memory..).

8 years agoWPS: Add more debug details for Credential building
Jouni Malinen [Thu, 23 Sep 2010 02:20:01 +0000 (19:20 -0700)]
WPS: Add more debug details for Credential building

8 years agoWPS ER: Fix debug message for protocol run done case
Jouni Malinen [Thu, 23 Sep 2010 02:19:33 +0000 (19:19 -0700)]
WPS ER: Fix debug message for protocol run done case

This is not a failure and should not be indicated as such in the
debug log.

8 years agoWPS: Fix strict validation of encrypted data for WSC 2.0-only case
Jouni Malinen [Thu, 23 Sep 2010 02:17:13 +0000 (19:17 -0700)]
WPS: Fix strict validation of encrypted data for WSC 2.0-only case

Need to figure out whether the message is from a WSC 2.0 -based
device based on the unencrypted attributes, not the contents of the
encrypted data since the Version2 subelement is only included in the
unencrypted area.

8 years agohostapd: Add virt/phy flag for Display/PushButton if needed (WPS 2.0)
Jouni Malinen [Thu, 23 Sep 2010 00:45:43 +0000 (17:45 -0700)]
hostapd: Add virt/phy flag for Display/PushButton if needed (WPS 2.0)

This seems to be the easiest way of making sure the Config Methods
value is compliant with the WSC 2.0 specification without having
to modify the configuration file. However, this will only add the
virtual flag, so the configuration files should really be updated
to specify values that match the AP design.

8 years agoWPS: Use blacklist more aggressively during WPS provisioning
Jouni Malinen [Wed, 22 Sep 2010 18:50:15 +0000 (11:50 -0700)]
WPS: Use blacklist more aggressively during WPS provisioning

This allows more APs to be tried during the WPS timeout.

8 years agoWPS: Making some parsing messages use excessive debug level
Jouni Malinen [Wed, 22 Sep 2010 18:39:58 +0000 (11:39 -0700)]
WPS: Making some parsing messages use excessive debug level

This makes it easier to read -dd debug logs in environments that
have multiple WPS or P2P devices.

8 years agoWPS: Fix strict validation of (Re)Association Response
Jouni Malinen [Wed, 22 Sep 2010 18:13:18 +0000 (11:13 -0700)]
WPS: Fix strict validation of (Re)Association Response

This frame is supposed to include Response Type, not Request Type
attribute.

8 years agoWPS 2.0: Provide (Re)Association Response WPS IE to driver
Jouni Malinen [Wed, 22 Sep 2010 17:46:44 +0000 (10:46 -0700)]
WPS 2.0: Provide (Re)Association Response WPS IE to driver

WPS 2.0 mandates the AP to include WPS IE in (Re)Association Response
if the matching (Re)Association Request included WPS IE. Provide the
needed WPS IE information to the driver_ops API for drivers that
process association frames internally.

Note: This modifies the driver_ops API by adding a new argument to
set_ap_wps_ie().

8 years agoWPS: Add MAC address to validation error message for Probe Request
Jouni Malinen [Wed, 22 Sep 2010 17:07:20 +0000 (10:07 -0700)]
WPS: Add MAC address to validation error message for Probe Request

This makes it easier to figure out which device is sending invalid
Probe Request frames.

8 years agoWPS: Make testing operations configurable at runtime
Jouni Malinen [Wed, 22 Sep 2010 02:51:23 +0000 (19:51 -0700)]
WPS: Make testing operations configurable at runtime

Instead of build time options (CONFIG_WPS_TESTING_EXTRA_CRED and
CONFIG_WPS_EXTENSIBILITY_TESTING), use a single build option
(CONFIG_WPS_TESTING) and runtime configuration of which testing
operations are enabled. This allows a single binary to be used
for various tests.

The runtime configuration can be done through control interface
with wpa_cli/hostapd_cli commands:
Enable extensibility tests:
set wps_version_number 0x57
Disable extensibility tests (WPS2 build):
set wps_version_number 0x20
Enable extra credential tests:
set wps_testing_dummy_cred 1
Disable extra credential tests:
set wps_testing_dummy_cred 0

8 years agoWPS 2.0: Fix AuthorizedMACs check to accept wildcard address
Jouni Malinen [Wed, 22 Sep 2010 02:36:44 +0000 (19:36 -0700)]
WPS 2.0: Fix AuthorizedMACs check to accept wildcard address

We need to accept both our own address and the ff:ff:ff:ff:ff:ff
as an indication of the AP having authorized us.

8 years agoP2P: Fill in default Config Methods in Invitation Request
Jouni Malinen [Wed, 22 Sep 2010 01:26:01 +0000 (18:26 -0700)]
P2P: Fill in default Config Methods in Invitation Request

If the peer is not authorized for GO Negotiation, wps_method is not
actually set. In that case, it is better to fill in our default
config methods rather than end up leaving the field to be zero.

9 years agoWPS: Fix Beacon WPS IE on concurrent dualband AP in PBC mode
Jouni Malinen [Mon, 20 Sep 2010 22:32:29 +0000 (15:32 -0700)]
WPS: Fix Beacon WPS IE on concurrent dualband AP in PBC mode

The Beacon frame must include UUID-E and RF Bands attributes when
in active PBC mode to allow stations to figure out that two BSSes in
PBC mode is not a PBC session overlap.

9 years agoWPS: Add more verbose debug info on PBC session overlap detection
Jouni Malinen [Mon, 20 Sep 2010 22:08:52 +0000 (15:08 -0700)]
WPS: Add more verbose debug info on PBC session overlap detection

9 years agoWPS: Add BSSID to strict validation error messages
Jouni Malinen [Mon, 20 Sep 2010 21:54:22 +0000 (14:54 -0700)]
WPS: Add BSSID to strict validation error messages

This makes it easier to figure out which AP is sending invalid
Beacon or Probe Response frames.

9 years agoWPS: Use same UUID in multi-interface case
Jouni Malinen [Mon, 20 Sep 2010 21:28:43 +0000 (14:28 -0700)]
WPS: Use same UUID in multi-interface case

When generating the UUID based on MAC address, share the same UUID
with all interfaces. This fixes a potential issue with concurrent
dualband APs where the UUID needs to be same for PBC to work properly.

9 years agoWPS: Fix CONFIG_WPS_OOB build
Jouni Malinen [Mon, 20 Sep 2010 00:18:43 +0000 (17:18 -0700)]
WPS: Fix CONFIG_WPS_OOB build

The Version2 attribute was previous changed to a subelement and
the OOB code was missed during the change.

9 years agoWPS: Cancel WPS operation on PBC session overlap detection
Jouni Malinen [Mon, 20 Sep 2010 00:04:04 +0000 (17:04 -0700)]
WPS: Cancel WPS operation on PBC session overlap detection

Previously, wpa_supplicant remaining in scanning state without
trying to connect, but there is no particular need to do that.
Instead, cancel WPS operation completely whenever PBC session
overlap is detected.