Commit graph

931 commits

Author SHA1 Message Date
Jouni Malinen 6d4747a9a2 Add P2P Interface Address into ctrl_iface status output 2010-09-09 07:17:19 -07:00
Jouni Malinen 80c9582a5f P2P: Add test command for filtering which peers are discovered
"wpa_cli p2p_set peer_filter <MAC address>" can now be used to
only allow a single P2P Device (based on P2P Device Address) to be
discovered for testing. Setting the address to 00:00:00:00:00:00
disables the filter.
2010-09-09 07:17:19 -07:00
Jouni Malinen 6e6963ea86 P2P: Add test mode for SD to force fragmented response 2010-09-09 07:17:19 -07:00
Jouni Malinen 18708aadfc P2P: Initial support for SD fragmentation (GAS Comeback Request/Response) 2010-09-09 07:17:19 -07:00
Jouni Malinen 2a43101e48 P2P: Fix memory leak in SD service entries
Need to flush stored service entries when wpa_supplicant is being
terminated.
2010-09-09 07:17:19 -07:00
Jouni Malinen bf608cad56 P2P: Rename SD info not available define to match with spec change 2010-09-09 07:17:19 -07:00
Jouni Malinen 706887fc28 P2P: Stop early when processing not-persistent invitation result 2010-09-09 07:17:19 -07:00
Jouni Malinen 2e062d5d74 P2P: Fix Group ID in Invitation Request from active GO
Need to get P2P Device Address, not the Interface Address.
2010-09-09 07:17:19 -07:00
Jouni Malinen 108def931e P2P: Add command for pre-authorizing an invitation to an active group
This is mainly designed for testing and allows p2p_connect join auth
to be used to accept a specific invitation to an active group that
may be received in the future.
2010-09-09 07:17:19 -07:00
Jouni Malinen 3c5126a41f P2P: Set Device Password ID in WPS M1/M2 per new rules
If the P2P client (WPS Enrollee) uses a PIN from the GO (Registrar),
Device Password ID in M1 & M2 is set to Registrar-specified.
2010-09-09 07:17:19 -07:00
Jouni Malinen ef922c4a34 P2P: Run a scan before provision discovery in p2p_connect join
This is needed to make sure we have fresh BSS information for the GO.
2010-09-09 07:17:19 -07:00
Jouni Malinen c381508d88 P2P: Implement power save configuration
wpa_cli p2p_set ps <0/1/2>
wpa_cli p2p_set oppps <0/1>
wpa_cli p2p_set ctwindow <0..> msec
2010-09-09 07:17:19 -07:00
Jouni Malinen 07a30a66c3 P2P: Do not schedule new remain-on-channel if waiting for drv event
The driver event for remain-on-channel may be delayed in a way that
allows management-frame-received event to be received before
wpa_supplicant knows that the driver is actually already on the
previously requested channel. We should not request a new
remain-on-channel to send a response to just a frame if we are waiting
for the driver to get to the same channel. Instead, just continue
waiting for the driver event.
2010-09-09 07:17:18 -07:00
Jouni Malinen d6ae995057 P2P: Fix infinite loop on interface selection for Action frame TX
When the first wpa_supplicant interface is not the correct one for
transmitting an Action frame (e.g., P2P Presence Request frame
uses a group interface), the code got stuck in an infinite busy
loop. Fix the iteration to go through the interfaces properly.
2010-09-09 07:17:18 -07:00
Jouni Malinen df91238b54 P2P: wpa_qui-qt4: Add P2P functionality into the GUI 2010-09-09 07:17:18 -07:00
Jouni Malinen 42f0101b4d P2P: wpa_cli action calls for P2P group started/removed events 2010-09-09 07:17:18 -07:00
Jouni Malinen 57faa1cee8 wpa_cli: Add P2P commands 2010-09-09 07:17:18 -07:00
Jouni Malinen 9fdd0fada7 P2P: Add disassociation/deauthentication IE notifications 2010-09-09 07:17:18 -07:00
Jouni Malinen 9bae1be0a1 P2P: Map driver events to P2P event notifications 2010-09-09 07:17:18 -07:00
Jouni Malinen 0c6b310e83 P2P: Show P2P info in ctrl_iface scan results 2010-09-09 07:17:18 -07:00
Jouni Malinen d23bd8940f P2P: Show P2P Device Address in wpa_cli status 2010-09-09 07:17:18 -07:00
Jouni Malinen b563b3882e P2P: Add control interface commands for P2P 2010-09-09 07:17:18 -07:00
Jouni Malinen 0817de904e P2P: Optimize scan timeouts for group formation 2010-09-09 07:17:17 -07:00
Jouni Malinen 5f3a6aa0a4 P2P: Add P2P IE into (Re)Association Request frames 2010-09-09 07:17:17 -07:00
Jouni Malinen 0e65037c27 P2P: Add P2P IE into Probe Request frames 2010-09-09 07:17:17 -07:00
Jouni Malinen 6e3f4b89ea P2P: Let the driver wrapper know if association is for P2P group 2010-09-09 07:17:17 -07:00
Jouni Malinen e44f8bf20a P2P: Add P2P configuration and callbacks in hostapd code 2010-09-09 07:17:17 -07:00
Jouni Malinen b22128efdc P2P: Add initial version of P2P Module 2010-09-09 07:17:17 -07:00
Jouni Malinen fdadd5fe03 P2P: Do not register l2_packet on dedicated P2P device interface 2010-09-09 07:17:17 -07:00
Jouni Malinen 73e492693d P2P: Add TODO note for Group Formation bit use in AP selection 2010-09-09 07:17:17 -07:00
Jouni Malinen 4c2c302893 P2P: Remove 802.11b rates from wpa_supplicant AP mode operations
TODO: do this only for P2P group interface
2010-09-09 07:17:17 -07:00
Jouni Malinen 4dac02455a P2P: Use config block with disabled==2 to store persistent groups 2010-09-09 07:17:17 -07:00
Jouni Malinen 75bde05d53 P2P: Add driver operations for P2P use 2010-09-09 07:17:16 -07:00
Jouni Malinen 2ff99b3c38 P2P: Do not save temporary networks 2010-09-09 07:17:16 -07:00
Jouni Malinen b2c5a4a3df P2P: Do not filter BSSes based on SSID during P2P Provisioning
TODO: Use group id from GO Neg instead(?)
2010-09-09 07:17:16 -07:00
Jouni Malinen 9fa243b295 P2P: Let WPS code know if it is used in a P2P group 2010-09-09 07:17:16 -07:00
Jouni Malinen e3768e7c94 P2P: Add global configuration parameters for P2P 2010-09-09 07:17:16 -07:00
Jouni Malinen 2c5d725c65 P2P: Add dynamic network config block parameters for P2P 2010-09-09 07:17:16 -07:00
Jouni Malinen 611aea7d41 Allow ctrl_iface SET command to change global config parameters 2010-09-09 07:17:16 -07:00
Jouni Malinen 1d47214aa9 Add flag indicating which global configuration parameters have changed 2010-09-09 07:17:16 -07:00
Jouni Malinen 121adf9c2e Move global configuration parser into config.c
This makes it easier to provide support for dynamic updates of the
global configuration parameters while wpa_supplicant is running.
2010-09-09 07:17:16 -07:00
Jouni Malinen 42f50264c0 WPS: Make fragment size configurable for EAP-WSC peer
"wpa_cli set wps_fragment_size <val>" can now be used to configure the
fragment size limit for EAP-WSC.
2010-09-09 06:07:49 -07:00
Jouni Malinen cae67937ca WPS: Fix CONFIG_WPS_STRICT build option
This was not supposed to be depending on CONFIG_WPS_NFC.
2010-09-09 06:07:49 -07:00
Jouni Malinen ad4741183f WPS 2.0: Make sure PHY/VIRT flag gets set for PBC 2010-09-09 06:07:48 -07:00
Jouni Malinen 53587ec183 WPS 2.0: Make WSC 2.0 support to be build option (CONFIG_WPS2)
For now, the default build will only include WSC 1.0 support.
CONFIG_WPS2=y can be used to add support for WSC 2.0.
2010-09-09 06:07:48 -07:00
Jouni Malinen 54f489be45 WPS 2.0: Validate WPS attributes in management frames and WSC messages
If CONFIG_WPS_STRICT is set, validate WPS IE(s) in management frames and
reject the frames if any of the mandatory attributes is missing or if an
included attribute uses an invalid value. In addition, verify that all
mandatory attributes are included and have valid values in the WSC
messages.
2010-09-09 06:07:48 -07:00
Jouni Malinen 6a857074f4 WPS 2.0: Add virtual/physical display and pushbutton config methods 2010-09-09 06:07:47 -07:00
Jouni Malinen 31fcea931d WPS 2.0: Add support for AuthorizedMACs attribute
Advertize list of authorized enrollee MAC addresses in Beacon and
Probe Response frames and use these when selecting the AP. In order
to provide the list, the enrollee MAC address should be specified
whenever adding a new PIN. In addition, add UUID-R into
SetSelectedRegistrar action to make it potentially easier for an AP
to figure out which ER sent the action should there be multiple ERs
using the same IP address.
2010-09-09 06:07:47 -07:00
Jouni Malinen 266c828e54 bgscan learn: Fix build
Commit 9ff80a10e8 forgot to include the
new scan variable in the coded copied from bgscan_simple.c. Add that
here to fix the build.
2010-09-09 05:59:06 -07:00
Jouni Malinen af3e1b0ec2 dbus: Verify WPA/RSN IE parser result before returning data 2010-09-04 22:01:29 +03:00
Jouni Malinen 7f5420691e wpa_supplicant AP: Make sure deauth/disassoc event is valid
Verify that the driver wrapper is using a valid deauth/disassoc
event before dereferencing the addr pointer. The address is required
to be set in AP mode, but it is safer to verify this here than to
trust on all driver wrappers doing the correct thing.
2010-09-04 21:50:12 +03:00
Jouni Malinen a745b7a775 wpa_gui-qt4: Update copyright years to include 2010 2010-09-04 17:39:33 +03:00
Jouni Malinen 17f9f44ed8 Update WinPcap to the latest stable version 4.1.2 2010-09-04 17:37:57 +03:00
Jouni Malinen 0c80427d77 NDIS: Fix association for WPS provisioning with protected AP
Some NDIS drivers require a workaround to allow them to associate
with a WPS AP that is already using protection (Privacy field = 1).
Let driver_ndis.c know if the AP is already using Privacy and if so,
configure a dummy WEP key to force the driver to associate.
2010-09-04 13:56:12 +03:00
Jouni Malinen 687179edb5 Add libgcc_s_dw2-1.dll to the Windows installation package
This seems to be needed for wpa_gui.exe with the new Qt version.
2010-09-04 12:55:55 +03:00
Jouni Malinen de1267d4eb winreg: Get rid of compiler warning 2010-09-02 13:22:52 +03:00
Jouni Malinen 0c703df32d Fix BSS selection with multiple configured networks
Commit d8d940b746 broke the logic on
iterating through all configured network blocks. This was supposed
to continue the loop on mismatch to allow other than the first
configured network to be found.
2010-08-28 12:04:21 +03:00
Masashi Honma 60da5e0f3f Solaris: Add support for wired IEEE 802.1X client
This patch adds support for wired IEEE 802.1X client on the Solaris.

I have tested with these:
OS : OpenSolaris 2009.06
EAP : EAP-MD5
Switch : Cisco Catalyst 2950
2010-08-28 11:40:07 +03:00
Jouni Malinen 9ff80a10e8 bgscan learn: Skip immediate scan on initial signal event
The driver is likely to indicate an immediate signal event when the
threshold value is configured. Since we do this immediately after
association, there is not much point in requesting a new scan to be
started based on this event.
2010-08-27 20:30:19 +03:00
Jouni Malinen 1e6ef6455c bgscan simple: Skip immediate scan on initial signal event
The driver is likely to indicate an immediate signal event when the
threshold value is configured. Since we do this immediately after
association, there is not much point in requesting a new scan to be
started based on this event.
2010-08-27 20:29:02 +03:00
Jouni Malinen d8d940b746 Merge WPA and non-WPA network selection routines
This removes quite a bit of duplicated code and allows network block
priority configuration to be used to prefer unprotected networks and
also allows use on open network with good signal strength even if
scan results show a protected network with marginal signal strength
that does not allow it to be used.
2010-08-27 20:05:49 +03:00
Jouni Malinen 60a972a68d Add current signal strength into signal quality change events 2010-08-27 16:58:06 +03:00
Jouni Malinen 09f58c0984 Share common code in wpa_supplicant_{disassociate,deauthenticate}() 2010-08-26 13:43:38 +03:00
Jouni Malinen eb0a3c7f96 Cancel authentication timeout on local deauth/disassoc request
Without this, the timeout may be left behind even when we are not
connected and may result in unwanted operation when the timeout
triggers.
2010-08-26 13:39:58 +03:00
Masashi Honma 509a39727f WPS: Fix unused variable warning
The wpa_supplicant compilation without CONFIG_WPS option results in
messages below.

scan.c: In function 'wpa_supplicant_scan':
scan.c:246: warning: unused variable 'wps'

This trivial patch erases this warning.
2010-08-20 09:44:50 +03:00
Jouni Malinen f9cd8587fb dbus: Deauthenticate instead of disassociate on disconnect command
This clears up authentication state in the driver and in case of
cfg80211, unlocks the BSS entry for the previously used AP. The
previous commit cf4783e35f changed
only the ctrl_iface DISCONNECT command behavior; this new commit
does the same for D-Bus commands.
2010-08-18 21:27:30 +03:00
Samuel Ortiz 7e26053a2c sme: Check for prev_bssid from sme_event_disassoc
wpa_s->bssid is already cleared by mark_disassoc() when we're getting the
disassociation event for the case where wpa_supplicant requested
disassociation. wpa_s->sme.prev_bssid holds the BSSID we need to check
for, so use that instead.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-08-18 21:23:26 +03:00
Jouni Malinen 2e75a2b3a6 Add more debug info on deauth/disassoc events and commands 2010-08-17 21:04:38 +03:00
Samuel Ortiz cb1583f64b sme: Try all authentication algorithms when the first one fails
When passing several authentication algorithms through auth_alg, we
should try all of them when the first one fails. The wext driver goes
through the connect nl80211 command and the retries are then handled by
the kernel. The nl80211 doesn't and we have to handle that from
userspace.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2010-08-17 16:39:33 +03:00
Jouni Malinen 77895cd937 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.
2010-08-11 18:07:22 +03:00
Jouni Malinen f3f0f648d7 wpa_cli: Clean up redrawing and filter out BSS added/removed events 2010-08-11 17:58:04 +03:00
Jouni Malinen 24f7694062 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.
2010-07-18 16:11:03 -07:00
Jouni Malinen 9b7124b27f Add some more debug for driver events 2010-07-17 20:33:34 -07:00
Jouni Malinen 5bc0cdb721 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.
2010-07-17 20:32:25 -07:00
Jouni Malinen 979b988ed6 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.
2010-07-17 20:30:49 -07:00
Jouni Malinen 4436274bef 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.
2010-07-17 20:28:22 -07:00
Jouni Malinen 6e3f7173f1 SME: Retry scan after authentication failure
This is needed to avoid getting stuck if driver fails authentication
request for some reason.
2010-07-17 20:27:19 -07:00
Jouni Malinen 3f967fe055 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.
2010-07-17 20:26:47 -07:00
Jouni Malinen 69a6b47aa0 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.
2010-07-17 20:25:41 -07:00
Jouni Malinen 79614ec55b bgscan learn: Remove forgotten debug printf 2010-07-10 19:59:31 -07:00
Jouni Malinen 3b7442e5fe bgscan learn: Mark BSSes that show up in the same scan as neighbors 2010-07-10 18:33:22 -07:00
Jouni Malinen 2e2a8d073d 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.
2010-07-10 18:09:41 -07:00
Jouni Malinen fc480e88bf 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.
2010-07-10 17:41:16 -07:00
Jouni Malinen 2e8d6ae32e bgscan learn: Add data file for storing learned network information 2010-07-10 16:05:31 -07:00
Jouni Malinen c4d71c2505 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.
2010-07-10 15:55:48 -07:00
Jouni Malinen c2594c3677 bgscan: Provide scan results to the notify_scan handler 2010-07-10 15:43:44 -07:00
Sam Leffler 3b038d7968 Fix bgscan stopping after dissassociation
Clear bgscan_ssid on disassoc event so bgscan is initialized the next
time we reach COMPLETED state.
2010-07-10 14:43:48 -07:00
Jouni Malinen 41e650ae5c 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.
2010-06-11 13:50:13 -07:00
Jouni Malinen f62c2315f7 Show signal level and WPS support in scan results debug dump
This makes it easier to debug AP selection for WPS provisioning.
2010-06-11 13:47:33 -07:00
Jouni Malinen d902a9c1bc Fix scan_runs counting
Addition of the background scanning mechanism in commit
60b94c9819 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.
2010-06-11 11:15:16 -07:00
Jouni Malinen 7d6640a62c 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.
2010-05-28 00:01:48 +03:00
Jouni Malinen 3085b8052e WPS ER: Add initial documentation for External Registrar functionality 2010-05-27 15:25:18 +03:00
Jouni Malinen 15dbf1291a WPS ER: Add ctrl_iface event for learned AP settings 2010-05-27 15:24:45 +03:00
Jouni Malinen 0848668513 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.
2010-05-27 15:23:55 +03:00
Jouni Malinen 7cc5995845 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.
2010-05-23 20:23:11 +03:00
Jouni Malinen 25c226ea45 Fix CONFIG_AP=y build without CONFIG_IEEE8021X_EAPOL=y 2010-05-23 12:18:47 +03:00
Masashi Honma 37a86b7b36 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
2010-05-23 12:12:40 +03:00
Jouni Malinen 8401a6b028 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.
2010-05-23 10:27:32 +03:00
Kel Modderman 1491f8a785 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>
2010-05-02 11:17:13 +03:00
Kel Modderman adc8d4a791 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>
2010-05-02 11:08:03 +03:00