Commit Graph

3791 Commits

Author SHA1 Message Date
Jouni Malinen a8f3bfc421 SCARD: Add debug dumps of FCP template TLVs in SELECT response
Signed-hostap: Jouni Malinen <j@w1.fi>
2012-03-03 13:28:46 +02:00
Jouni Malinen f41ed0f845 SCARD: Reindent scard_parse_fsp_templ()
This was left at incorrect indentation level when moved to a separate
function.

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-03-03 12:35:14 +02:00
Jouni Malinen 400020cbe8 Interworking: Update configuration file documentation for credentials
Signed-hostap: Jouni Malinen <j@w1.fi>
2012-03-03 10:49:02 +02:00
Jouni Malinen 11e4f46a10 Interworking: Add support for certificate credentials (EAP-TLS)
This allows Interworking network selection to be used with EAP-TLS
(client certificate/private key based credential).

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-03-03 10:38:10 +02:00
Jouni Malinen 10531d2166 P2P: Fix provisioning info clearing after successful WPS step
Previously, this provisioning info was cleared using the P2P Interface
Address of the GO as the key. That did not always work in the case the
where we joined an already running group. This could result in the next
connection to that same GO skipping provision discovery. Fix this by
finding the peer entry based on its P2P Device Address instead of the
P2P Interface Address which may not always be set.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
intended-for: hostap-1
2012-03-01 22:06:03 +02:00
Jouni Malinen 9f85a37e03 Fix P2P-SERV-DISC-{REQ,RESP} documentation
The Service Update Indicator parameter was missing from documentation.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-03-01 19:55:46 +02:00
Jouni Malinen 6979582ca6 Fix processing of channel list update events
Commit 6bf731e8ce broke handling of
EVENT_CHANNEL_LIST_CHANGED by introducing a cached copy of the driver
channel list that does not get updated even if driver changes its list.
Fix this by synchronizing the cacched wpa_s->hw.modes information
whenever EVENT_CHANNEL_LIST_CHANGED is processed. This fixes P2P channel
list updates based on regulatory domain hints that may trigger driver to
change its supported channel list.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
intended-for: hostap-1
2012-03-01 17:59:39 +02:00
Jouni Malinen ef48ff940b Fix CTRL-EVENT-DISCONNECTED event for locally generated disconnection
When wpa_supplicant disconnects, e.g., due to authentication timeout,
we need to go through the EVENT_DISASSOC/DEAUTH processing similarly
to the driver triggered cases to get correct events delivered to the
ctrl_iface. Fix this by calling wpa_supplicant_event() in these cases
and by filtering out the confusing CTRL-EVENT-DISCONNECTED event with
all zeros BSSID.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-03-01 15:42:35 +02:00
Jouni Malinen 75c208b9db P2P: Fix p2p_cancel to return success if GO Negotiation is stopped
If a GO Negotiation peer is found, wpas_p2p_stop_find() stops the
negotiation and p2p_cancel can return success.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-03-01 01:16:06 +02:00
Jouni Malinen 1affa36cb5 WPS: Invalidate wildcard PIN on other radios after successful use
If a wildcard PIN is used on any of the radios that hostapd is
controlling, invalidate the matching PIN on all the other radios
to avoid multiple uses of the same PIN.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-02-29 20:42:48 +02:00
Jouni Malinen 85ea132a13 P2P: Use scan optimization for post-provisioning connection
Since P2P GO cannot change the SSID after WPS provisioning step, we
can use the specific SSID for the scan for data connection. In addition,
mark this as p2p_probe to avoid unnecessary use of 802.11b rates.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-02-29 00:34:53 +02:00
Jouni Malinen 8e64f258c6 P2P: Optimize provisioning step scan for join-a-group sequence
Copy the SSID and frequency of the selected group into go_params in
join-a-running-group case so that the scan optimization can be used for
the provisioning step similarly to the case of group formation. This
uses a specific SSID and a single channel scan to avoid unnecessary
frames during the step.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-02-29 00:22:58 +02:00
Jouni Malinen a21c05db23 P2P: Use specific SSID in scan for provisioning step
Since the P2P client learns the SSID of the group during GO Negotiation,
use the specific SSID in the Probe Request frames during the
provisioning step. This helps in avoiding unnecessary Probe Response
frames from other P2P GOs or APs.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-02-29 00:02:34 +02:00
Jouni Malinen 360182ed7c P2P: Advertise immediate availability of WPS credential
Use Device Password ID in WSC IE of Probe Request and Probe Response
frames to advertise immediate availability of WPS credentials per P2P
specification sections 3.1.2.1.1 (Listen State), 3.1.2.1.2 (Scan Phase),
and 3.1.2.1.3 (Find Phase).

For now, the Device Password ID is set only for the case where we are
active GO Negotiation with a specific peer. In practice, this means that
the Probe Response frames during pending GO Negotiation (whenever in
Listen state) indicate availability of the credential.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-02-27 23:14:35 +02:00
Jouni Malinen 78db55b800 P2P: Make p2p_flush stop P2P operations consistently
p2p_flush did not explicit stop all P2P operations, i.e., the exact
behavior depended on the P2P module state at the time the p2p_flush
command was issued. Make this more consistent by explicitly calling
p2p_stop_find() from p2p_flush().

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-02-27 19:10:04 +02:00
Jouni Malinen 1a9c618d3f P2P: Fix remain-on-channel use with PD/Invitation Request while in Listen
If Listen state was in progress on another channel when a request to
send an Action frame (e.g., Provision Discovery Request or Invitation
Request to a peer on the peer's Listen channel that is different from
our Listenc hannel) is issued, wpa_supplicant tried to use concurrent
remain-on-channel operations. While some drivers can handle this
cleanly, there are drivers that don't and wpa_supplicant is not expected
to request concurrent remain-on-channel operations.

Fix this by cancelling the ongoing remain-on-channel with stop_listen
prior to sending the Action frame on another channel. If a P2P search
was in progress, it will be continued after the timeout on the new
operation.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-02-27 17:23:41 +02:00
Vivek Natarajan e62f4ed0df Add support for hidden SSID in wpa_supplicant AP mode
This also disables WPS support if hidden SSID is enabled in AP mode.

Signed-off-by: Vivek Natarajan <nataraja@qca.qualcomm.com>
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-02-27 16:28:45 +02:00
Jouni Malinen 1d4839ee85 Fix CONFIG_AP + CONFIG_INTERWORKING build
Need to include gas_serv.o in the build to get all the needed symbols.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-02-27 16:21:50 +02:00
Jouni Malinen 648cc711a5 GAS server: Add support for ANQP Venue Name element
The new venue_name configuration parameter can now be used to configure
the ANQP Venue Name values that stations can request through GAS.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-02-26 22:53:22 +02:00
Jouni Malinen 3eaee4bf4b GAS server: Add support for ANQP Roaming Consortium list
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-02-26 22:53:16 +02:00
Jay Katabathuni dca30c3fb7 Interworking: Add GAS server support for AP mode
This adds GAS/ANQP implementation into hostapd. This commit brings in
the basic GAS/ANQP functionality, but only the ANQP Capability List
element is supported.

For testing purposes, hostapd control interface SET command can be used
to set the gas_frag_limit parameter dynamically.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-02-26 22:52:53 +02:00
Jay Katabathuni fb80e86e7d Add hostapd_drv_send_action()
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-02-26 22:52:37 +02:00
Jouni Malinen 6bcf537833 pcsc: Allow T1 protocol to be enabled
The previous implementation was hardcoding only T0 protocol to be
acceptable. Allow T1 to be selected, too.

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-02-26 13:14:46 +02:00
Jouni Malinen f64adcd71e Allow PC/SC reader to be selected and initialized at start
New global configuration parameters pcsc_reader and pcsc_pin can now be
used to initialize PC/SC reader context at start of wpa_supplicant.

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-02-26 13:09:30 +02:00
Jouni Malinen 3825a19bfa Generate random ANonce instead of one based on Counter
Definition of ANonce selection in IEEE Std 802.11i-2004 is somewhat
ambiguous. The Authenticator state machine uses a counter that is
incremented by one for each 4-way handshake. However, the security
analysis of 4-way handshake points out that unpredictable nonces help in
preventing precomputation attacks. Instead of the state machine
definition, use an unpredictable nonce value here to provide stronger
protection against potential precomputation attacks.

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-02-26 12:06:36 +02:00
Dmitry Shmidt 6e2a570ec4 Android: Build wpa_supplicant.conf from a template
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2012-02-25 18:22:53 +02:00
Dmitry Shmidt 1e1411b04f Android: Add PLATFORM_VERSION to VERSION_STR_POSTFIX definition
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2012-02-25 18:22:38 +02:00
Dmitry Shmidt 5db498920f Android: Add build configuration files
These are from Android wpa_supplicant_8.git initial 0.8.X commit
8d520ff1dc2da35cdca849e982051b86468016d8 with some additional edits and
renaming of .config files to android.config.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2012-02-25 18:22:34 +02:00
Dmitry Shmidt e9af53ad39 Add CONFIG_NO_ROAMING option
This can be used to disable wpa_supplicant controlled roaming. It should
be noted that the WPA_DRIVER_FLAGS_BSS_SELECTION capability is the
preferred way for this and CONFIG_NO_ROAMING should be obsoleted once
drivers support the new NL80211_ATTR_ROAM_SUPPORT capability
advertisement.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2012-02-25 18:22:31 +02:00
Jithu Jance e60b295186 Add wpa_supplicant AP mode STA deauthenticate/disassociate commands
Move disassociate and deauthenticate commands to ctrl_iface_ap.c, so
that they ares accessible for wpa_supplicant AP mode and wpa_cli (with
CONFIG_AP option enabled).

Signed-hostap: Jithu Jance <jithu@broadcom.com>
2012-02-25 17:22:48 +02:00
Reinette Chatre 93d1749fe0 dbus: return NULL data for peer IEs
The org.freedesktop.DBus.Properties interface is now supported for peer
properties. Ensure that GetAll will work by having the IEs property
function return NULL data instead of a failure until it is implemented.

Signed-hostap: Reinette Chatre <reinette.chatre@intel.com>
intended-for: hostap-1
2012-02-25 10:54:11 +02:00
Reinette Chatre ca29842700 dbus: revert changes to some peer properties
Commit 3f6e50ac28 made it possible to access
P2P peer properties using the org.freedesktop.DBus.Properties interface.

While maintaining the original intent of that patch we make two changes
to it here:

First, 3f6e50ac28 changed the type used to
represent the WPS vendor extension data from bytes to a string. In
addition to the type change the way in which the vendor extension data
was provided to the function creating the string was incorrect and would
not present the correct vendor extension data even in string format.

Revert the type change made in 3f6e50ac28
and present the WPS vendor extension data as an array of an array of
bytes as it was before.

Second, 3f6e50ac28 changes the secondary
device types representation from an array of an array of bytes to an
array of bytes. Revert that change to make secondary device types
accessible via an array of an array of bytes again.

Signed-hostap: Reinette Chatre <reinette.chatre@intel.com>
intended-for: hostap-1
2012-02-25 10:50:13 +02:00
Jayant Sane 96c4f3a707 dbus: utility to create dbus message from wpabuf array
If a wpabuf array is used to store basic typed data that we would like
to send over D-Bus then this utility will be of help when it places the
data in a variant with format aa? (array of an array of type ?, with ?
indicating any basic type).

Signed-hostap: Jayant Sane <jayant.sane@intel.com>
Signed-hostap: Angie Chinchilla <angie.v.chinchilla@intel.com>
intended-for: hostap-1
2012-02-25 10:45:17 +02:00
Jouni Malinen dddc70455b P2P: Add more debug on group idle timeout
This makes it easier to debug issues with P2P group idle timeout.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-02-19 18:16:34 +02:00
Jouni Malinen a7a30b90e5 P2P: Fix group idle timer cancellation on group removal
The wpas_p2p_group_idle_timeout was getting cancelled in the beginning
of wpas_p2p_group_delete(). However, in the case of P2P client role,
this function called wpa_supplicant_deauthenticate() next and that ended
up changing state to WPA_DISCONNECTED which resulted in
wpas_p2p_notif_disconnected() rescheduling the timeout. This left the
unexpected timeout behind after the group was removed. If another group
operation was started within P2P_MAX_CLIENT_IDLE (10) seconds, that
timeout could end up terminating the group while it was still being set
up.

Fix this by reordering wpas_p2p_group_delete() to cancel the group idle
timeout only after having called wpa_supplicant_deauthenticate(). The
group idle timeout is still rescheduled, but it gets removed immediately
afterwards when the actual group information is being cleared.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-02-19 18:10:20 +02:00
Jouni Malinen 2c60ca7391 Clean up array insertion to skip unnecessary memmove
The previous elements need to be moved only if we are inserting the new
network in the middle of the list. While the memmove of zero bytes at
the end of the array does not cause real problems, some static analyzers
complain about this, so in addition to slightly optimized
implementation, this removes some analyzer warnings, too.

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-02-19 16:44:30 +02:00
Jouni Malinen f4b2d69b07 Fix memory leak on set_cred error path
Signed-hostap: Jouni Malinen <j@w1.fi>
2012-02-19 14:29:38 +02:00
Jouni Malinen 1485ec076b Fix memory leak on error path in bssid_filter setting
Signed-hostap: Jouni Malinen <j@w1.fi>
2012-02-19 14:28:02 +02:00
Jouni Malinen d8e59feab2 Interworking: Fix SIM/USIM NAI construction
Commit 9914c96feb moved sizeof(nai) to a
helper function and broke the determination of maximum buffer length.
Fix this by moving the sizeof() to the functions that define the buffer.

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-02-19 14:24:45 +02:00
Jouni Malinen 974c56ac24 WPS UPnP: Clean up URL parser
Remove unnecessary second copy of the URL and too long memory
allocation. In addition, avoid use of strcpy() to keep static analyzers
happier.

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-02-19 13:19:34 +02:00
Jouni Malinen 4a0d25f08a Android: Extend debug logging to include wpa_dbg and hexdump
This makes the Android debug logs from logcat quite a bit more helpful
in debugging wpa_supplicant.

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-02-18 20:59:24 +02:00
Jouni Malinen 6d441b0da2 wext: Filter unexpected interface added/up events
It looks like a RTM_NEWLINK event claiming the interface to be UP is
delivered just before removing an interface after having first indicated
that the interface was going down/removed. Ignore this event if the
interface is not present anymore at the moment the event is processed.
This fixes issues where an interface that was re-added after being
removed did not get reconfigured properly.

Signed-hostap: Jouni Malinen <j@w1.fi>
intended-for: hostap-1
2012-02-18 13:28:21 +02:00
Jouni Malinen cb6710a4a5 Use WPA_INTERFACE_DISABLED with interface removed events
This makes WPA_INTERFACE_DISABLED more consistent in indicating that
wpa_supplicant cannot currently control the interface regardless of
whether the interface is disabled or completely removed.

Signed-hostap: Jouni Malinen <j@w1.fi>
intended-for: hostap-1
2012-02-18 13:16:17 +02:00
Jouni Malinen d1f4942ba1 nl80211: Filter unexpected interface added/up events
It looks like a RTM_NEWLINK event claiming the interface to be UP is
delivered just before removing an interface after having first indicated
that the interface was going down/removed. Ignore this event if the
interface is not present anymore at the moment the event is processed.
This fixes issues where an interface that was re-added after being
removed did not get reconfigured properly.

Signed-hostap: Jouni Malinen <j@w1.fi>
intended-for: hostap-1
2012-02-18 13:13:23 +02:00
Jouni Malinen 8a6a1e1b14 nl80211: Indicate p2p_probe in debug log as scan parameter
Signed-hostap: Jouni Malinen <j@w1.fi>
2012-02-18 12:39:01 +02:00
Jouni Malinen 6f3bc72be0 P2P: Allow channels to be removed from P2P use
A list of disallowed frequencies for P2P channel list can now be
configured with P2P_SET disallow_freq. The frequencies (or frequency
pairs) are comma separated. For example:
wpa_cli p2p_set disallow_freq 2462,5000-6000

The allowed P2P channel list is constructed by removing explicitly
disallowed channels from the channel list received from the driver.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-02-17 22:57:13 +02:00
Jouni Malinen b8a8d6774b P2P: Do not include P2P IE in association request to non-P2P AP
This was previously fixed for most cases in commit
ffad885837, but the check here for
drivers that implement SME/MLME was missed in that commit.

This removes the P2P IE from (Re)Association Request frame with
drivers that do not use wpa_supplicant SME implementation and are
P2P cabable when associating with a non-P2P AP (i.e., not a GO or
P2P WLAN manager AP).

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
intended-for: hostap-1
2012-02-17 11:34:56 +02:00
Jouni Malinen 0047c047fc EAP-SIM/AKA server: Fix re-authentication not to update pseudonym
AT_NEXT_PSEUDONYM is supposed to be included only in the Challenge
messages, not in the Re-authentication messages. This attribute was
incorrectly included in the Re-authentication messages and could have
been used to update the pseudonym state on the server without the peer
updating its state.

Signed-hostap: Jouni Malinen <j@w1.fi>
intended-for: hostap-1
2012-02-16 23:31:30 +02:00
Jouni Malinen 05c15c897d EAP-AKA peer: Clean up forgetting-id debug prints
Do not show forgetting of old id values if no value was stored.

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-02-16 23:25:53 +02:00
Jouni Malinen 9d23cff598 hostapd: Allow 'none' driver to be started without ifname
Commit 0dcc4dc4b3 made driver
initialization conditional on interface name being configured. This can
break hostapd-as-RADIUS-server use case where this parameter does not
really make any sense. Fix this with a special case for the none driver.

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-02-16 23:11:29 +02:00