]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - build-utilities/hostap.git/log
build-utilities/hostap.git
13 years agoUpdate for 0.8.x and include licensing terms in top level README
Jouni Malinen [Wed, 10 Nov 2010 20:10:02 +0000 (22:10 +0200)]
Update for 0.8.x and include licensing terms in top level README

This brings in the full licensing text from
{hostapd,wpa_supplicant}/README into the top level README file
for clarity.

13 years agoDrop local stations on broadcast deauth/disassoc request
Jouni Malinen [Wed, 10 Nov 2010 15:09:31 +0000 (17:09 +0200)]
Drop local stations on broadcast deauth/disassoc request

When hostapd_cli deauth/disassoc is used with ff:ff:ff:ff:ff:ff
address, drop all local STA entries in addition to sending out the
broadcast deauth/disassoc frame.

13 years agowlantest: Fix BIP replay detection
Jouni Malinen [Wed, 10 Nov 2010 14:59:45 +0000 (16:59 +0200)]
wlantest: Fix BIP replay detection

13 years agoP2P: Replace the default country with "XX" (non-country entity)
Jouni Malinen [Wed, 10 Nov 2010 14:22:22 +0000 (16:22 +0200)]
P2P: Replace the default country with "XX" (non-country entity)

13 years agoFix a typo in the comment
Jouni Malinen [Wed, 10 Nov 2010 12:23:57 +0000 (14:23 +0200)]
Fix a typo in the comment

13 years agoP2P: Reselect operating channel preference based on best channels
Jouni Malinen [Wed, 10 Nov 2010 11:34:33 +0000 (13:34 +0200)]
P2P: Reselect operating channel preference based on best channels

When the peer does not include our initial preference in the Channel
List attribute during GO Negotiation, try to use the best channel of
the other band as the new preference instead of falling back to the
first channel in the intersection.

13 years agoP2P: Add support for automatic channel selection at GO
Anil Gathala Sudha [Wed, 10 Nov 2010 11:33:47 +0000 (13:33 +0200)]
P2P: Add support for automatic channel selection at GO

The driver wrapper may now indicate the preferred channel (e.g., based
on scan results) on both 2.4 GHz and 5 GHz bands (and an overall best
frequency). When setting up a GO, this preference information is used
to select the operating channel if configuration does not include
hardcoded channel. Similarly, this information can be used during
GO Negotiation to indicate preference for a specific channel based
on current channel conditions.

p2p_group_add command can now use special values (freq=2 and freq=5)
to indicate that the GO is to be started on the specified band.

13 years agowlantest: Validate MMIE MIC
Jouni Malinen [Wed, 10 Nov 2010 00:06:59 +0000 (02:06 +0200)]
wlantest: Validate MMIE MIC

13 years agowlantest: Parse KDEs from message 2/4
Jouni Malinen [Tue, 9 Nov 2010 23:16:32 +0000 (01:16 +0200)]
wlantest: Parse KDEs from message 2/4

13 years agowlantest: Use more consistent debug levels for keys
Jouni Malinen [Tue, 9 Nov 2010 18:35:24 +0000 (20:35 +0200)]
wlantest: Use more consistent debug levels for keys

13 years agowlantest: Parse Key Data KDEs and store GTK and IGTK
Jouni Malinen [Tue, 9 Nov 2010 18:29:12 +0000 (20:29 +0200)]
wlantest: Parse Key Data KDEs and store GTK and IGTK

13 years agohostapd: Prohibit WEP configuration when HT is enabled
Yogesh Ashok Powar [Tue, 9 Nov 2010 14:49:03 +0000 (16:49 +0200)]
hostapd: Prohibit WEP configuration when HT is enabled

WFA 11n testing does not allow WEP when IEEE 802.11n is enabled.
Reject such combination when parsing hostapd configuration file.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
13 years agowpa_supplicant: Test all compiled drivers before failing
Samuel Ortiz [Tue, 9 Nov 2010 14:45:27 +0000 (16:45 +0200)]
wpa_supplicant: Test all compiled drivers before failing

wpa_supplicant_set_driver() is returning an error if the first driver
in the driver list is not built in. It should continue through the
driver list until it finds one that's built in.

13 years agohostapd: Add comment about CONFIG_FULL_DYNAMIC_VLAN to defconfig
Helmut Schaa [Tue, 9 Nov 2010 14:38:59 +0000 (16:38 +0200)]
hostapd: Add comment about CONFIG_FULL_DYNAMIC_VLAN to defconfig

Add comment about CONFIG_FULL_DYNAMIC_VLAN to defconfig. By default
this feature is still disabled.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
13 years agohostapd: Fix config reload for multi-BSS
Felix Fietkau [Tue, 9 Nov 2010 14:35:49 +0000 (16:35 +0200)]
hostapd: Fix config reload for multi-BSS

Secondary BSS interfaces need to be activated after the config has
been reloaded.

13 years agowpa_supplicant: Fix port state management without IEEE8021X_EAPOL
Felix Fietkau [Tue, 9 Nov 2010 14:31:33 +0000 (16:31 +0200)]
wpa_supplicant: Fix port state management without IEEE8021X_EAPOL

If IEE8021X_EAPOL is not enabled in the config, wpa_drv_set_supp_port
must be called from the supplicant, otherwise port will not be
activated after association.

13 years agoAllow client isolation to be configured (ap_isolate=1)
Felix Fietkau [Tue, 9 Nov 2010 14:27:15 +0000 (16:27 +0200)]
Allow client isolation to be configured (ap_isolate=1)

Client isolation can be used to prevent low-level bridging of frames
between associated stations in the BSS. By default, this bridging is
allowed.

13 years agoFix rate table handling
Felix Fietkau [Tue, 9 Nov 2010 14:17:50 +0000 (16:17 +0200)]
Fix rate table handling

With the nl80211 driver, the rate table is mode dependent, so it
must be initialized after the hardware mode has been selected.

13 years agoAdd bridge handling for WDS STA interfaces
Felix Fietkau [Tue, 9 Nov 2010 14:12:42 +0000 (16:12 +0200)]
Add bridge handling for WDS STA interfaces

By default, add them to the configured bridge of the AP interface
(if present), but allow the user to specify a separate bridge.

13 years agonl80211: Fix AP VLAN handling for WDS STA reassociation
Felix Fietkau [Tue, 9 Nov 2010 14:03:05 +0000 (16:03 +0200)]
nl80211: Fix AP VLAN handling for WDS STA reassociation

When a STA reassociates, the AP VLAN interface is still present,
do not attempt to create it in that case.

13 years agoFix WDS STA reassociation
Felix Fietkau [Tue, 9 Nov 2010 01:44:02 +0000 (02:44 +0100)]
Fix WDS STA reassociation

If the STA entry is present in hostapd, but not in the kernel driver, its
WDS status needs to be restored when the STA reassociates

13 years agodriver_roboswitch: include net/if.h instead of linux/if.h
Felix Fietkau [Tue, 9 Nov 2010 01:38:58 +0000 (02:38 +0100)]
driver_roboswitch: include net/if.h instead of linux/if.h

including linux/if.h clashes with other header files on some systems

13 years agodriver_madwifi: fix a compile error on big endian systems
Felix Fietkau [Tue, 9 Nov 2010 01:38:36 +0000 (02:38 +0100)]
driver_madwifi: fix a compile error on big endian systems

13 years agoWPS: Add wildcard AuthorizedMACs entry for PBC
Jouni Malinen [Tue, 9 Nov 2010 09:24:06 +0000 (11:24 +0200)]
WPS: Add wildcard AuthorizedMACs entry for PBC

13 years agowlantest: Decrypt EAPOL-Key 3/4 Key Data
Jouni Malinen [Mon, 8 Nov 2010 22:39:43 +0000 (00:39 +0200)]
wlantest: Decrypt EAPOL-Key 3/4 Key Data

13 years agoAllow TSN AP to be selected when configured for WEP
Jouni Malinen [Mon, 8 Nov 2010 19:14:32 +0000 (21:14 +0200)]
Allow TSN AP to be selected when configured for WEP

Commit d8d940b7469e505aec4d71a02d3f7ebab412eeae introduced a regression
that prevented TSN APs from being used with WEP since the AP was
rejected if it advertised WPA or RSN IE when we were configured to use
WEP. Resolve this by checking whether the AP is advertising a TSN, i.e.,
whether the AP allows WEP to be used as a group cipher. If so, allow
the AP to be selected if we are configured to use static WEP or
IEEE 802.1X (non-WPA).

It should be noted that this is still somewhat more restricted in AP
selection than earlier wpa_supplicant branches (0.7.x or older) that
ignore the WPA/RSN IE completely when configured for non-WPA.

13 years agowlantest: Derive PMK from RADIUS exchange
Jouni Malinen [Sun, 7 Nov 2010 17:43:10 +0000 (19:43 +0200)]
wlantest: Derive PMK from RADIUS exchange

Decrypt MPPE keys and derive PMK from RADIUS exchange if RADIUS
shared secret is known. Use the derived PMK when trying to derive
PTK during 4-Way Handshake.

13 years agowlantest: Add capturing and parsing of RADIUS messages
Jouni Malinen [Sun, 7 Nov 2010 15:59:50 +0000 (17:59 +0200)]
wlantest: Add capturing and parsing of RADIUS messages

Another interface (-I) or pcap file (-R) can now be specified as a
source of RADIUS packets. These packets are now parsed, but the
MSK is not yet derived for PMK use.

13 years agowlantest: Fix LLC debug print
Jouni Malinen [Sun, 7 Nov 2010 09:31:11 +0000 (11:31 +0200)]
wlantest: Fix LLC debug print

13 years agowlantest: Add PTK derivation based on passphrases
Jouni Malinen [Sat, 6 Nov 2010 20:57:49 +0000 (22:57 +0200)]
wlantest: Add PTK derivation based on passphrases

Allow pre-configuration of passphrases (-p<passphrase>) to provide
enough information for wlantest to be able to derive PMK for each
BSS and PTK for each STA going through 4-Way Handshake (at least
message 2 and 3 needs to be received).

13 years agowlantest: Parse EAPOL-Key frames
Jouni Malinen [Sat, 6 Nov 2010 19:49:57 +0000 (21:49 +0200)]
wlantest: Parse EAPOL-Key frames

13 years agowlantest: Maintain a copy of WPA/RSN IE from (Re)AssocReq
Jouni Malinen [Sat, 6 Nov 2010 16:10:34 +0000 (18:10 +0200)]
wlantest: Maintain a copy of WPA/RSN IE from (Re)AssocReq

13 years agowlantest: Move Mgmt and Data frame processing into their own files
Jouni Malinen [Sat, 6 Nov 2010 16:01:24 +0000 (18:01 +0200)]
wlantest: Move Mgmt and Data frame processing into their own files

13 years agowlantest: Move bss_update() into bss.c
Jouni Malinen [Sat, 6 Nov 2010 15:57:21 +0000 (17:57 +0200)]
wlantest: Move bss_update() into bss.c

13 years agowlantest: Maintain STA state based on auth/assoc/deauth/disassoc
Jouni Malinen [Sat, 6 Nov 2010 15:55:27 +0000 (17:55 +0200)]
wlantest: Maintain STA state based on auth/assoc/deauth/disassoc

13 years agowlantest: Create station list for each BSS
Jouni Malinen [Sat, 6 Nov 2010 15:31:02 +0000 (17:31 +0200)]
wlantest: Create station list for each BSS

13 years agowlantest: Maintain table of BSS information
Jouni Malinen [Sat, 6 Nov 2010 15:11:12 +0000 (17:11 +0200)]
wlantest: Maintain table of BSS information

Whenever a Beacon or Probe Response frame is observed, add or update
a BSS entry to maintain current information about the active BSSes.

13 years agowlantest: Add preliminary version of IEEE 802.11 protocol testing tool
Jouni Malinen [Sat, 6 Nov 2010 14:20:45 +0000 (16:20 +0200)]
wlantest: Add preliminary version of IEEE 802.11 protocol testing tool

This tool can be used to capture IEEE 802.11 frames either from a
monitor interface for realtime capturing or from pcap files for
offline analysis. This version is only adding basic infrastructure for
going through the frames and parsing their headers.

13 years agoFix EAP standalone server
Jouni Malinen [Sun, 7 Nov 2010 14:25:35 +0000 (16:25 +0200)]
Fix EAP standalone server

Commit c3fc47ea8e1d3730e11eb9978d13831212727902 fixed EAP passthrough
server to allow Logoff/Re-authentication to be used. However, it
broke EAP standalone server while doing that. Fix this by reverting
the earlier fix and by clearing the EAP Identity information in the
EAP server code whenever an EAPOL-Start or EAPOL-Logoff packet is
received.

13 years agoeapol_test: Unregister EAP server methods if CONFIG_AP=y
Jouni Malinen [Sun, 7 Nov 2010 09:38:26 +0000 (11:38 +0200)]
eapol_test: Unregister EAP server methods if CONFIG_AP=y

This fixes a memory leak in CONFIG_AP=y builds.

13 years agoP2P: Clear off_channel_freq when requesting new remain-on-channel
Jouni Malinen [Fri, 5 Nov 2010 16:39:42 +0000 (18:39 +0200)]
P2P: Clear off_channel_freq when requesting new remain-on-channel

The driver may end up leaving the current channel when we request
a new remain-on-channel and as such, it is better not assume we can
start new operations like sending an Action frame on the previous
off-channel.

13 years agoP2P: Cancel pending remain-on-channel request when stopping Listen
Jouni Malinen [Fri, 5 Nov 2010 16:39:15 +0000 (18:39 +0200)]
P2P: Cancel pending remain-on-channel request when stopping Listen

If we have already asked the driver to start a new remain-on-channel,
we need to cancel it even if the actual remain-on-channel has not yet
started at the point when a new operation or timeout etc. triggers
Listen state to be stopped.

13 years agoP2P: Do not skip call to p2p_scan_res_handled()
Jouni Malinen [Fri, 5 Nov 2010 16:17:42 +0000 (18:17 +0200)]
P2P: Do not skip call to p2p_scan_res_handled()

Even if p2p_scan_res_handler() returns 1 to indicate that scan result
iteration should be stopped, the p2p_scan_res_handled() needs to be
called to clear p2p_scan_running and to get a callback that will start
any operations that were delayed because of the running scan.

13 years agoP2P: Drop pending TX frame on new p2p_connect
Jouni Malinen [Fri, 5 Nov 2010 16:17:20 +0000 (18:17 +0200)]
P2P: Drop pending TX frame on new p2p_connect

We need to drop the pending frame to avoid issues with the new GO
Negotiation, e.g., when the pending frame was from a previous attempt at
starting a GO Negotiation.

13 years agoRemove unused TX queue parameters related to Beacon frames
Jouni Malinen [Thu, 4 Nov 2010 23:23:17 +0000 (01:23 +0200)]
Remove unused TX queue parameters related to Beacon frames

These are not used by any driver wrapper, i.e., only the four
data queues (BK, BE, VI, VO) are configurable. Better remove these
so that there is no confusion about being able to configure
something additional.

13 years agoWPS: Send WSC_NACK if message without Message Type is received
Jouni Malinen [Thu, 4 Nov 2010 16:17:00 +0000 (18:17 +0200)]
WPS: Send WSC_NACK if message without Message Type is received

13 years agoWPS: Share common function for building WSC ACK/NACK
Jouni Malinen [Thu, 4 Nov 2010 16:16:14 +0000 (18:16 +0200)]
WPS: Share common function for building WSC ACK/NACK

These are identical functions in Enrollee and Registrar and there
is no need to maintain two copies of the same functionality.

13 years agoWPS: Do not advertise support for WEP in WPS 2.0 build
Jouni Malinen [Thu, 4 Nov 2010 15:37:20 +0000 (17:37 +0200)]
WPS: Do not advertise support for WEP in WPS 2.0 build

There is no point in advertising support for WEP or Shared Key
authentication if we are going to reject those anyway based on
WPS 2.0 rules.

13 years agoWPS: Remove PushButton from M1 ConfigMethods on AP
Jouni Malinen [Thu, 4 Nov 2010 15:29:48 +0000 (17:29 +0200)]
WPS: Remove PushButton from M1 ConfigMethods on AP

These config methods are for the Enrollee role, i.e., for adding
external Registrars, and as such, PushButton should not be claimed
to be supported.

13 years agonl80211: Allow libnl to be replaced with libnl-tiny
Jouni Malinen [Thu, 4 Nov 2010 15:14:58 +0000 (17:14 +0200)]
nl80211: Allow libnl to be replaced with libnl-tiny

CONFIG_LIBNL_TINY=y can be used to select libnl-tiny instead of
libnl.

13 years agoWPS: Comment out WEP configuration lines on reconfig
Jouni Malinen [Thu, 4 Nov 2010 15:02:16 +0000 (17:02 +0200)]
WPS: Comment out WEP configuration lines on reconfig

13 years agoP2P: Copy p2p_intra_bss setting to the group interface
Jouni Malinen [Thu, 4 Nov 2010 14:53:09 +0000 (16:53 +0200)]
P2P: Copy p2p_intra_bss setting to the group interface

This is needed to allow p2p_intra_bss take effect when using
separate group interfaces.

13 years agoP2P: Allow p2p_cancel to cancel P2P client that has not yet connected
Jouni Malinen [Thu, 4 Nov 2010 09:59:44 +0000 (11:59 +0200)]
P2P: Allow p2p_cancel to cancel P2P client that has not yet connected

This can now be used to cancel a P2P client interface that has not
yet completed the first 4-way handshake with a GO.

13 years agoP2P: Skip extra remain-on-channel if oper channel matches
Jouni Malinen [Tue, 2 Nov 2010 17:35:40 +0000 (19:35 +0200)]
P2P: Skip extra remain-on-channel if oper channel matches

There is no need to separately move to the correct channel
for transmitting an Action frame that is using the group
interface (i.e., source address is P2P Interface Address).
This removes extra latency from P2P Action frame operations
within a P2P group.

13 years agoWPS ER: Clear WPS state if PutMessage does not include NewOutMessage
Jouni Malinen [Tue, 2 Nov 2010 09:20:54 +0000 (11:20 +0200)]
WPS ER: Clear WPS state if PutMessage does not include NewOutMessage

This is needed to avoid getting stuck with pending WPS operation, e.g.,
when an AP replies to WSC_NACK with HTTP OK, but without following
message.

13 years agonl80211: Pass data frames from unknown STAs to hostapd
Helmut Schaa [Sun, 31 Oct 2010 19:36:43 +0000 (21:36 +0200)]
nl80211: Pass data frames from unknown STAs to hostapd

Pass data frames from unknown STAs to hostapd in order to reply with
a Deauthentication or Disassociation frame. This fixes compliance
with IEEE Std 802.11-2007, 11.3.

Furthermore, this does not cause a lot of overhead (at least with
mac80211 drivers) since mac80211 does not pass all data frames (but
at least from unauthenticated and unassociated STAs) to cooked monitor
interfaces.

Tested with rt2800pci on a MIPS board.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
13 years agoAdd ctrl_iface command 'GET version'
Jouni Malinen [Sun, 31 Oct 2010 15:07:31 +0000 (17:07 +0200)]
Add ctrl_iface command 'GET version'

This can be used to fetch the wpa_supplicant/hostapd version
string.

13 years agoAdd WPA_IGNORE_CONFIG_ERRORS option to continue in case of bad config
Dmitry Shmidt [Sun, 31 Oct 2010 10:38:49 +0000 (12:38 +0200)]
Add WPA_IGNORE_CONFIG_ERRORS option to continue in case of bad config

This is an option to continue with wpa_supplicant and hostapd even if
config file has errors. The problem is that these daemons are the best
"candidates" for the config change, so if they can not start because
config file was let's say corrupted, you can not fix it easily.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agoP2P: Fix random channel selection to use os_get_random
Jouni Malinen [Sun, 31 Oct 2010 10:27:37 +0000 (12:27 +0200)]
P2P: Fix random channel selection to use os_get_random

This could have been using an uninitialized variable instead of
purposefully random value in picking up the channel. There is not
much of a difference for the use case here, but anyway, we may
as well do what was initially planned here and.

13 years agoP2P: Reorder code to avoid memory leak on error path
Jouni Malinen [Sun, 31 Oct 2010 10:24:21 +0000 (12:24 +0200)]
P2P: Reorder code to avoid memory leak on error path

13 years agoFix copy-paste bug in p2p_serv_disc_resp handling
Jouni Malinen [Sun, 31 Oct 2010 10:17:30 +0000 (12:17 +0200)]
Fix copy-paste bug in p2p_serv_disc_resp handling

The destination address for p2p_serv_disc_resp must always be set
to an individual MAC address unlike p2p_serv_disc_req which may use
00:00:00:00:00:00 to indicate wildcard query. As such, we should not
try to check for this special case here.

13 years agoP2P: Add NULL pointer validation for ssid for group started event
Jouni Malinen [Sun, 31 Oct 2010 10:12:07 +0000 (12:12 +0200)]
P2P: Add NULL pointer validation for ssid for group started event

It looks likely that ssid is not NULL here, but better keep this
consistent with other uses of ssid pointer in this function.

13 years agoMake wpa_hexdump_buf{,-key} handle NULL buffer
Jouni Malinen [Sun, 31 Oct 2010 10:09:18 +0000 (12:09 +0200)]
Make wpa_hexdump_buf{,-key} handle NULL buffer

This matches with behavior of other wpa_hexdump* functions.

13 years agoClear vars in drivers makefile
Dmitry Shmidt [Sun, 31 Oct 2010 09:59:31 +0000 (11:59 +0200)]
Clear vars in drivers makefile

drivers.mak is shared between hostapd and wpa_supplicant and
compiling them together may create "wrong" flags.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
13 years agoWPS ER: Add validation of WPS attributes in proxied Probe Request
Jouni Malinen [Sun, 31 Oct 2010 09:57:13 +0000 (11:57 +0200)]
WPS ER: Add validation of WPS attributes in proxied Probe Request

When strict validation is enabled in the build, check the WPS
attributes in proxied Probe Request frames.

13 years agoAdd ctrl_interface event for association rejected
Jouni Malinen [Wed, 27 Oct 2010 17:28:16 +0000 (20:28 +0300)]
Add ctrl_interface event for association rejected

13 years agoAdd BSSID to association rejected events
Jouni Malinen [Wed, 27 Oct 2010 17:27:39 +0000 (20:27 +0300)]
Add BSSID to association rejected events

13 years agoP2P: Do not re-send PD Request for join-a-group after acked frame
Jouni Malinen [Wed, 27 Oct 2010 16:36:10 +0000 (19:36 +0300)]
P2P: Do not re-send PD Request for join-a-group after acked frame

We are not actually interested in the PD Response in join-a-group
case, so there is no point in trying to send PD Request until the
response is received. This avoids an extra PD getting started after
a join-a-group operation in some cases.

13 years agoP2P: Fix removal_reason setting to use correct pointer
Jouni Malinen [Wed, 27 Oct 2010 08:47:41 +0000 (11:47 +0300)]
P2P: Fix removal_reason setting to use correct pointer

The previous version triggered a NULL pointer dereference on
P2P_GROUP_REMOVE * command.

13 years agoAllow EAPOL frames from pre-authenticating station to be processed
Jouni Malinen [Fri, 8 Oct 2010 12:49:12 +0000 (15:49 +0300)]
Allow EAPOL frames from pre-authenticating station to be processed

13 years agoatheros: Remove debug for ioctls that are not used anymore
Shan Palanisamy [Tue, 26 Oct 2010 19:02:45 +0000 (22:02 +0300)]
atheros: Remove debug for ioctls that are not used anymore

This is needed to fix build with a newer driver version.

13 years agoFix compiler warning from previous commit
Jouni Malinen [Wed, 27 Oct 2010 08:31:32 +0000 (11:31 +0300)]
Fix compiler warning from previous commit

13 years agoFix memory leak in P2P build without MLME
Jouni Malinen [Wed, 27 Oct 2010 08:26:46 +0000 (11:26 +0300)]
Fix memory leak in P2P build without MLME

The ieee80211_sta_free_hw_features() function is now used outside
the MLME code, so better make sure it gets included in the build
to avoid leaking memory.

13 years agohostapd: Set operstate UP when initializing AP mode
Jouni Malinen [Tue, 26 Oct 2010 13:30:28 +0000 (16:30 +0300)]
hostapd: Set operstate UP when initializing AP mode

This is needed to avoid problems with other applications setting and
leaving the interface to IF_OPER_DORMANT state. In AP mode, the interface
is ready immediately after the keys are set, so we better make sure the
DORMANT state does not prevent normal operations after that.

13 years agoP2P: Fix parsing of UTF-8 device names
Jouni Malinen [Tue, 26 Oct 2010 07:40:35 +0000 (10:40 +0300)]
P2P: Fix parsing of UTF-8 device names

The control character verification was supposed to only replace
bytes 0..31, not 0..31 and 128..255 as happened on systems where
char is signed.

13 years agoWPS ER: Cache AP settings for APs that restart UPnP
Jouni Malinen [Mon, 25 Oct 2010 19:22:07 +0000 (22:22 +0300)]
WPS ER: Cache AP settings for APs that restart UPnP

This is needed to avoid issues with APs that restart their UPnP,
e.g., when ER reconfigures them. The previously known settings are
now cached and taken into use if an AP is detected to leave
(ssdp:byebye) and then return.

13 years agoWPS ER: Add more details to wps_er_pbc failure returns
Jouni Malinen [Mon, 25 Oct 2010 18:59:25 +0000 (21:59 +0300)]
WPS ER: Add more details to wps_er_pbc failure returns

Indicate the reason for the failure when wps_er_pbc is rejected.

13 years agoWPS ER: Fix SetSelectedRegistrar to include wildcard AuthorizedMACs
Jouni Malinen [Mon, 25 Oct 2010 18:45:29 +0000 (21:45 +0300)]
WPS ER: Fix SetSelectedRegistrar to include wildcard AuthorizedMACs

This is required by WPS 2.0, so add the wildcard address to
AuthorizedMACs if no addresses are in the list.

13 years agoWPS ER: Only activate PBC mode on single AP
Jouni Malinen [Mon, 25 Oct 2010 18:41:10 +0000 (21:41 +0300)]
WPS ER: Only activate PBC mode on single AP

Verify that the UUID given to wps_er_pbc command is known and only
activate PBC mode on the matching AP. The UUID can be that of the
AP or the station/Enrollee.

13 years agoWPS ER: Show SetSelectedRegistrar events as ctrl_iface events
Jouni Malinen [Mon, 25 Oct 2010 18:29:22 +0000 (21:29 +0300)]
WPS ER: Show SetSelectedRegistrar events as ctrl_iface events

This makes it easier to figure out if something goes wrong in
preparing the AP for enrolling a station.

13 years agoP2P: Remove P2P group on driver resource becoming unavailable
Jouni Malinen [Mon, 25 Oct 2010 16:16:11 +0000 (19:16 +0300)]
P2P: Remove P2P group on driver resource becoming unavailable

Add a new driver event, EVENT_INTERFACE_UNAVAILABLE, for indicating
that the driver is not able to continue operating the virtual
interface in its current mode anymore, e.g., due to operating
channel for GO interface forced to a DFS channel by another virtual
interface.

When this happens for a P2P group interface, the P2P group will
be terminated and P2P-GROUP-REMOVED event shows the reason for
this as follows:
P2P-GROUP-REMOVED wlan0 GO reason=UNAVAILABLE

13 years agoWPS: Fix wps_reg command documentation to require BSSID
Jouni Malinen [Mon, 25 Oct 2010 15:56:49 +0000 (18:56 +0300)]
WPS: Fix wps_reg command documentation to require BSSID

Replacing the BSSID with 'any' has never worked with wps_reg
command, so better not claim it could work. In addition, reject
this is wpa_supplicant to make it clearer that the operation
fails.

13 years agoP2P: Add mechanism for timing out idle groups
Jouni Malinen [Mon, 25 Oct 2010 15:24:15 +0000 (18:24 +0300)]
P2P: Add mechanism for timing out idle groups

A new configuration parameter, p2p_group_idle, can now be used to set
idle timeout value for P2P groups in seconds (0 = no timeout). If set,
this values is used to remove P2P group (both GO and P2P client)
interfaces after the group has been idle (no clients/GO seen) for the
configuration duration.

The P2P-GROUP-REMOVED event is now indicating the reason for group
removal when known. For example:
P2P-GROUP-REMOVED wlan0 GO reason=REQUESTED
P2P-GROUP-REMOVED wlan1 client reason=IDLE

13 years agohostapd: Fix compiler warning
Jouni Malinen [Mon, 25 Oct 2010 10:38:06 +0000 (13:38 +0300)]
hostapd: Fix compiler warning

Commit 83e843e830112a810ef6a1f6c08dbe8200e47f0f copied a workaround
without updating the return value to match with the void function.

13 years agohostapd: Avoid crashing on station mode disassoc event
Jouni Malinen [Fri, 22 Oct 2010 14:43:23 +0000 (17:43 +0300)]
hostapd: Avoid crashing on station mode disassoc event

Some driver wrappers may end up indicating a disassociation or
deauthentication event without the address of the station, e.g.,
based on a previous non-AP mode event. Avoid crashing hostapd
by verifying that the require address parameter is available in
the event before processing it.

13 years agoShow wpa_supplicant version number in the debug log
Jouni Malinen [Fri, 22 Oct 2010 08:50:34 +0000 (11:50 +0300)]
Show wpa_supplicant version number in the debug log

13 years agohostapd: Add wps_config ctrl_interface command for configuring AP
Jouni Malinen [Thu, 21 Oct 2010 13:49:41 +0000 (16:49 +0300)]
hostapd: Add wps_config ctrl_interface command for configuring AP

This command can be used to configure the AP using the internal
WPS registrar. It works in the same way as new AP settings received
from an ER.

13 years agoP2P: Fix p2p_send_action conversions
Jouni Malinen [Wed, 20 Oct 2010 18:32:18 +0000 (21:32 +0300)]
P2P: Fix p2p_send_action conversions

Couple of these missed the change in the first argument and resulted
in various crashes.

13 years agoP2P: Delay send_action call if p2p_scan is in progress
Jouni Malinen [Wed, 20 Oct 2010 16:41:20 +0000 (19:41 +0300)]
P2P: Delay send_action call if p2p_scan is in progress

In order to avoid confusing the driver with a new remain-on-channel
request, delay sending of a new Action frame if the driver indicates
Action frame RX diromg a scan.

13 years agoP2P: Do not stop Listen state if it is on correct channel
Jouni Malinen [Wed, 20 Oct 2010 16:37:47 +0000 (19:37 +0300)]
P2P: Do not stop Listen state if it is on correct channel

This is needed to optimize response to GO Negotiation Request frames.
The extra remain-on-channel cancel followed by new remain-on-channel for
the same channel takes too much time with some driver/firmware
designs for the response to go out quickly enough to avoid peer
timing out while waiting for our response.

13 years agoFix crash on channel list changed event during driver init
Jouni Malinen [Wed, 20 Oct 2010 16:30:55 +0000 (19:30 +0300)]
Fix crash on channel list changed event during driver init

The driver wrapper may indicate EVENT_CHANNEL_LIST_CHANGED before
completing init(). This would likely result in segfault when driver
channel list is being read as part of processing this event when
P2P is enabled.

13 years agoWPS ER: Add wps_er_set_config to use local configuration
Jouni Malinen [Wed, 20 Oct 2010 10:37:01 +0000 (13:37 +0300)]
WPS ER: Add wps_er_set_config to use local configuration

This command can be used to enroll a network based on a local
network configuration block instead of having to (re-)learn the
current AP settings with wps_er_learn.

13 years agoWPS: Fix a compiler warning in hostapd_wps_update_ie()
Jouni Malinen [Wed, 20 Oct 2010 10:35:55 +0000 (13:35 +0300)]
WPS: Fix a compiler warning in hostapd_wps_update_ie()

13 years agoWPS: Update Beacon/ProbeResp IE on wps_version_number changes
Jouni Malinen [Tue, 19 Oct 2010 16:57:01 +0000 (19:57 +0300)]
WPS: Update Beacon/ProbeResp IE on wps_version_number changes

This test command is supposed to change the WPS version number in all
places immediately, so make sure that the IEs used in management
frames get updated immediately.

13 years agoP2P: Scan all channels if GO is not found from common channels
Jouni Malinen [Tue, 19 Oct 2010 15:38:49 +0000 (18:38 +0300)]
P2P: Scan all channels if GO is not found from common channels

This is not supposed to happen, but in theory, the GO may end up
changing its channels at some point. While it would be reasonable
to use one of the common channels, GO may be forced to use another
channel. The most likely reason for this would be if the P2P client
is enforcing only a single channel to be used (e.g., to avoid
multi-channel concurrent operations).

13 years agoP2P: Track non-P2P members in the group and set Group Limit bit
Jouni Malinen [Tue, 19 Oct 2010 15:10:28 +0000 (18:10 +0300)]
P2P: Track non-P2P members in the group and set Group Limit bit

The P2P group component is now tracking of associated stations
in the group and the Group Limit bit in the Group Capabilities
is updated based on whether there is room for new clients in
the group.

13 years agoFix max_stations to apply to associated STAs, not P2P peers
Jouni Malinen [Tue, 19 Oct 2010 14:17:04 +0000 (17:17 +0300)]
Fix max_stations to apply to associated STAs, not P2P peers

This driver capability limit was supposed to indicate limit on
how many stations can associate with us in the AP mode, not how
many P2P peers are stored in the peer table.

13 years agoAdd max_num_sta config option for wpa_supplicant AP mode
Jouni Malinen [Tue, 19 Oct 2010 14:08:20 +0000 (17:08 +0300)]
Add max_num_sta config option for wpa_supplicant AP mode

This can be used to limit the number of stations allowed to be
connected to the AP.

13 years agoP2P: Add p2p_cancel command for cancelling ongoing group formation
Jouni Malinen [Tue, 19 Oct 2010 12:53:28 +0000 (15:53 +0300)]
P2P: Add p2p_cancel command for cancelling ongoing group formation

13 years agoP2P: Skip GO Neg Conf ack failure workaround of send failures
Jouni Malinen [Tue, 19 Oct 2010 09:47:33 +0000 (12:47 +0300)]
P2P: Skip GO Neg Conf ack failure workaround of send failures

The workaround to ignore no ctrl::ack received for GO Negotiation
Confirmation frame was only supposed to be used when the frame was
actually transmitted and just the ack was not received. However, due
to the way the driver failure on transmitting the frame were reported,
this ended up getting applied for all failures in sending the GO
Negotiation Confirmation frame.

Improve this by providing a mechanism to indicate whether send_action
operations fail locally before the frame was actually transmitted or
because of not receiving ack frame after having transmitted the frame.