Commit graph

3334 commits

Author SHA1 Message Date
Jouni Malinen eaa8eefed1 Replace MAX_SSID_LEN with SSID_MAX_LEN
This makes source code more consistent. The use within Android driver
interface is left as-is to avoid changes in the old PNO interface
definition.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-04-22 11:44:18 +03:00
Jouni Malinen d9d1b9527a Use SSID_MAX_LEN define instead of value 32 when comparing SSID length
This makes the implementation easier to understand.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-04-22 11:44:18 +03:00
Jouni Malinen cc6f24380c Add WPS_DEV_NAME_MAX_LEN define and use it when comparing length
This make code easier to understand.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-04-22 11:44:18 +03:00
Floris Bos 8e2c5f1a20 dbus: Fix WPS property of fi.w1.wpa_supplicant1.BSS interface
The dbus interface documentation says the following about the
WPS property of the fi.w1.wpa_supplicant1.BSS interface:

==
WPS information of the BSS. Empty dictionary indicates no WPS support.
Dictionary entries are:

Type	s	"pbc", "pin", ""
==

However the implementation returns "type" => "" for BSSes
that do not support WPS.

Fix the implementation to match the documentation.
Return empty dictionary if there is no WPS support.
And "type" => "" if WPS is supported, but is not in progress
right now.

Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
2015-04-13 15:08:46 +03:00
Jouni Malinen b79911853f Fix CONFIG_AP=y build without CONFIG_CTRL_IFACE
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-04-04 11:56:53 +03:00
Jouni Malinen 954f03aab2 Fix compilation issues with CONFIG_NO_CONFIG_WRITE=y
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-04-04 11:52:03 +03:00
Ben Greear da3db6812d Fix INTERFACE_ADD parsing
This fixes a regression caused by commit
efa232f915 ('Add support for virtual
interface creation/deletion') for the case where an empty extra argument
is included.

Signed-off-by: Ben Greear <greearb@candelatech.com>
2015-04-04 11:02:04 +03:00
Ola Olsson 4839f7c768 wpa_cli: Fix a typo in usage text
Signed-off-by: Ola Olsson <ola.olsson@sonymobile.com>
2015-04-03 11:34:51 +03:00
Jason Abele a20a3616cd wpa_supplicant: Clear blacklist on connect
It has been noticed that the band steering/load balancing of some
multi-AP networks will lead to an ever-growing list of blacklisted
BSSIDs. This eventually leads to a connection drop when the connection
is pushed to a distant AP.

Fix this issue by clearing the blacklist upon successful connect.

Signed-off-by: Jason Abele <jason@aether.com>
2015-04-03 10:51:36 +03:00
Dmitry Shmidt 02e122a995 Reschedule scan from wpas_stop_pno if it was postponed
This reschedules the postponed scan request (if such a request is
pending) from EVENT_SCHED_SCAN_STOPPED event handler to speed up
scanning after PNO/sched_scan stop has been requested.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2015-04-01 18:21:36 +03:00
Jouni Malinen 56dfc4939d Fix a typo in configuration parameter documentation
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-04-01 12:57:11 +03:00
Avraham Stern 989e784601 P2P: Optimize scan frequencies list when re-joining a persistent group
When starting a P2P client to re-join a persistent group
(P2P_GROUP_ADD persistent=<id>), it is possible that the P2P GO was
already found in previous scans. Try to get the P2P GO operating
frequency from the scan results list so wpa_supplicant will initially
scan only the P2P GO known operating frequency.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2015-03-29 20:52:09 +03:00
Lauri Hintsala ce18c10773 Add support for CONFIG_NO_ROAMING to Makefile
Commit e9af53ad39 introduced new
CONFIG_NO_ROAMING configuration parameter but unfortunately it was added
only to Android.mk. Enabling this parameter didn't have any effect when
Makefile was used to build wpa_supplicant. This commit fixes that problem
and cleans "unused variable" compiler warning.

Signed-off-by: Lauri Hintsala <lauri.hintsala@silabs.com>
2015-03-29 20:37:39 +03:00
Jouni Malinen 65a7b21f5e OpenSSL: Implement AES-128 CBC using EVP API
This replaces the internal CBC mode implementation in
aes_128_cbc_encrypt() and aes_128_cbc_decrypt() with the OpenSSL
implementation for CONFIG_TLS=openssl builds.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-29 20:30:58 +03:00
Jouni Malinen a52410c29f Allow PSK/passphrase to be set only when needed
The new network profile parameter mem_only_psk=1 can be used to specify
that the PSK/passphrase for that network is requested over the control
interface (ctrl_iface or D-Bus) similarly to the EAP network parameter
requests. The PSK/passphrase can then be configured temporarily in a way
that prevents it from getting stored to the configuration file.

For example:

Event:
CTRL-REQ-PSK_PASSPHRASE-0:PSK or passphrase needed for SSID test-wpa2-psk

Response:
CTRL-RSP-PSK_PASSPHRASE-0:"qwertyuiop"

Note: The response value uses the same encoding as the psk network
profile parameter, i.e., passphrase is within double quotation marks.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-28 11:05:13 +02:00
Mikael Kanstrup 9ccc10f56e wpa_cli: Use tab as only word separator for networks
White space is a valid SSID character so completion routine for
networks should only use tab as word separator.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
2015-03-27 15:31:38 +02:00
Mikael Kanstrup 5a997b2f79 wpa_cli: Completion routine for dup_network command
Add command completion routine for dup_network command.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
2015-03-26 22:53:37 +02:00
Mikael Kanstrup 1ca6c0f1f1 wpa_cli: Completion for remove, select, disable, enable network
Add command completion routines for remove_network, select_network,
disable_network, and enable_network commands.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
2015-03-26 22:53:37 +02:00
Mikael Kanstrup 7e6cc90805 wpa_cli: Implement completion routine for get_network/set_network
Add command completion routine for get_network and set_network that
guide user with both network id and network parameters.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
2015-03-26 22:53:37 +02:00
Mikael Kanstrup 32a097fdd2 wpa_cli: Keep track of available networks
Keep track of available networks for easy use in command completion
routines.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
2015-03-26 22:53:35 +02:00
Mikael Kanstrup 94dc0e950d wpa_cli: Allow tab as alternative separator for cli_txt_list words
To be able to reuse the add/del word utility functions for lines containing
tabs allow both space and tab as word separators.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
2015-03-26 22:36:12 +02:00
Jithu Jance efa232f915 Add support for virtual interface creation/deletion
Extend interface_add and interface_remove commands via an optional
argument to allow wpa_supplicant to create/delete a new virtual
interface.

Signed-off-by: Jithu Jance <jithu@broadcom.com>
2015-03-26 22:20:35 +02:00
Mikael Kanstrup ba87329d96 wpa_cli: Use .wpa_cli_history under Android
wpa_cli already implements a command history file for easy accessing
commands previously used. Enable the functionality on Android, too.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
2015-03-26 15:29:13 +02:00
Ben Greear 0f8385e6fa Show OSEN key management properly in scan results
Old code defaulted to WEP for an AP advertising OSEN. Show as OSEN
instead. Re-use most of the RSN parsing logic since all but the header
is the same.

Example output:

[root@ath9k-f lanforge]# ./local/bin/wpa_cli -i sta0 scan_results
bssid / frequency / signal level / flags / ssid
00:0e:8e:6f:40:49	2462	-23	[OSEN-OSEN-CCMP][ESS]	ben-138

Signed-off-by: Ben Greear <greearb@candelatech.com>
2015-03-25 16:04:03 +02:00
Arkadiusz (Arkq) Bokowy e7b4cd0c55 wpa_gui: Add tray icon based signal strength meter
System tray icon can be set to 5 different pictographs according to the
connection status. One for disconnected state (not associated with the
network, or not connected with the wpa_supplicant service), and four for
connected status (showing the signal strength on the receiver).

By default this functionality is disabled. The reason for this, is the
fact, that the underlaying approach of this functionality is poll based,
which might be considered as a non-efficient one. Update interval has to
be set explicitly by the user with '-m<seconds>' command line argument.

Status icon names are based on various Gnome icon packs (e.g., Faba).
When icon can not be found, default one is shown (wpa_gui logo).

Signed-off-by: Arkadiusz Bokowy <arkadiusz.bokowy@gmail.com>
2015-03-25 15:41:15 +02:00
Krishna Vamsi c41d0840a1 nl80211: Allow driver-based roam to change ESS
This extends NL80211_CMD_ROAM event processing to allow the driver to
roam to another ESS (different SSID) when using offloaded BSS selection.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-03-24 21:13:28 +02:00
Jouni Malinen 0fd52a612a Remove duplicated wpa_s->conf->interworking check
wpas_add_interworking_elements() does not need to do this since the
caller is already checking whether Interworking is enabled.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-22 21:48:41 +02:00
Ilan Peer ad4430971f Add Extended Capabilities element to all Probe Request frames
Always add the Extended Capabilities element to Probe Request frames (in
case it is not all zeros) to publish support for driver advertised
capabilities and wpa_supplicant specific capabilities.

This also fixes the case where Extended Capabilities element was added
for Interworking cases, but did not use the driver advertised ones and
did not handle other capabilities supported by wpa_supplicant.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
2015-03-22 21:48:38 +02:00
Avraham Stern 9bd566a33a Delay AP selection if all networks are temporarily disabled
If all networks are temporarily disabled, delay AP selection until at
least one network is enabled. Running AP selection when all networks are
disabled is useless as wpa_supplicant will not try to connect. In
addition, it will result in needless scan iterations that may delay the
connection when it is needed.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
2015-03-22 20:53:58 +02:00
Avraham Stern 701f3961e3 Don't optimize scan frequencies if selected network has changed
When disconnecting from a BSS, the next scan is optimized to scan only
the channels used by the connected ESS. But when disconnecting because a
new network was selected, this optimization is wrong because
wpa_supplicant is now trying to connect to another ESS. Fix this by not
optimizing the scan frequencies in case the selected network has
changed.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
2015-03-22 20:36:01 +02:00
Max Stepanov e9d280503a P2PS: Extend p2p_service_del asp to support 'all' parameter
Extend p2p_service_del asp command to support 'all' parameter to delete
all ASP service advertisements.

Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
2015-03-20 15:56:59 +02:00
Max Stepanov 6dd51ecbf1 P2PS: Add P2PS advertisements on ALL_SERVICES ANQP query
Add P2PS advertisements to a query response on ANQP query of
ALL_SERVICES type.

Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
2015-03-20 15:56:59 +02:00
Max Stepanov c40a8918ec P2PS: Delete ASP advertisements on wpas_p2p_service_flush
Delete all ASP serice advertisement on wpas_p2p_service_flush similarly
to Bonjour and UPnP services.

Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
2015-03-20 15:56:59 +02:00
Max Stepanov 2dc422e2b3 P2PS: Update SD indicator value on ASP add/del/update
Update a service update indicator value on ASP service advertisement
add/del/update operations.

Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
2015-03-20 15:56:59 +02:00
Victor Goldenshtein 6ceea4c3cb Restart sched_scan on channel list change
The channel list can be changed as a result of arriving beacon hints
during normal scan or as a result of local Reg-Domain change. Some
passive channels can become active and needs to be reconfigured
accordingly for the scheduled scan.

This fixes the connection to hidden SSIDs on 5 GHz band during default
Reg-Domain 00 (world roaming).

Signed-off-by: Victor Goldenshtein <victorg@ti.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
2015-03-20 15:56:59 +02:00
Eliad Peller e7a296ba13 Remove unused shared_freq driver op
This driver op is not used anymore

Signed-off-by: Eliad Peller <eliad@wizery.com>
2015-03-20 15:56:59 +02:00
Jouni Malinen 55e8f0eafc Fix CONFIG_EAP_UNAUTH_TLS without CONFIG_EAP_TLS build
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-03-20 15:56:59 +02:00
Neelansh Mittal 9772af66ba Interworking: Prevent scan during ANQP fetch and Interworking select
Reject external scan request while either ANQP fetch or Interworking
select is in progress. Not doing so could lead to a situation in which
Interworking automatic network selection does not get triggered because
of a new scan result event forcing the ANQP fetch cycle to be disrupted
and restarted all over again. Interworking automatic network selection
is only triggered when AQNP fetch cycle, that is, ANQP exchange with
every Interworking capable BSS in the current BSS list, is completed.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-03-20 15:56:48 +02:00
Jouni Malinen 6784168d07 Remove SChannel support
SChannel/CryptoAPI as a TLS/crypto library alternative was never
completed. Critical functionality is missing and there are bugs in this
implementation. Since there are no known plans of completing this
support, it is better to remove this code.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-18 22:31:36 +02:00
Arkadiusz (Arkq) Bokowy 0b08f25445 wpa_gui: Documentation update
In the commit 77b244d577a7cb5c928478627af6687a0733193d9 ('wpa_gui: Quiet
mode - disable tray icon messages') a new parameter has been introduced,
but it was not documented. This commit fixes this omission.

Signed-off-by: Arkadiusz Bokowy <arkadiusz.bokowy@gmail.com>
2015-03-16 12:30:12 +02:00
Mikael Kanstrup 8ffaafae07 wpa_cli: Add missing parameters for "set" command completion routine
Some config parameters were missing in the "set" command completion
routine. Add missing parameters and while at it put the parameters
under compiler switches so only valid ones are shown.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
2015-03-15 21:00:57 +02:00
Mikael Kanstrup 0fd9d95fde wpa_cli: Add completion routine for "get" command
Add tab completion function that includes all available "get"
parameters.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
2015-03-15 21:00:17 +02:00
Mikael Kanstrup 5c6c315fba Add IPv4 support function for "get" control interface command
Add support to retrieve IPv4 config variables with the "get" control
interface command. This allows the ip_addr_* parameters for P2P+NFC
IP address assignment to be fetched from the GO.

Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
2015-03-15 20:57:16 +02:00
Jouni Malinen 74fa78b281 Add AVG_BEACON_RSSI to SIGNAL_POLL output
If the driver reports separate signal strength average for Beacon
frames, report that in SIGNAL_POLL output.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-15 20:45:20 +02:00
Jouni Malinen 0f89328575 P2P: Move upper layer SD interaction into a separate file
wpa_supplicant/p2p_supplicant.c has reached almost 10000 lines in length
and was getting a bit inconvenient to edit, so start splitting it into
separate files.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-15 20:25:48 +02:00
Jouni Malinen bc1d23ae1d Add ChangeLog entries for v2.4
Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-14 16:51:02 +02:00
Jouni Malinen f10487e1af Send CTRL-EVENT-DISCONNECTED on wpa_supplicant AP deinit
This makes the AP mode more consistent with other modes by providing a
matching pair of CTRL-EVENT-CONNECTED and CTRL-EVENT-DISCONNECTED event
messages.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-14 10:05:05 +02:00
Jouni Malinen 1d246a1db9 Make rate-not-supported debug print more useful
It looks like "hardware does not support required rate 1.0 Mbps" has
started showing up in some hwsim test cases as a reason for failure.
This should not really occur with mac80211_hwsim, so add more details to
the debug print to make it easier to figure out what exactly happened.

Signed-off-by: Jouni Malinen <j@w1.fi>
2015-03-07 15:35:40 +02:00
Sunil Dutt c10ca2a66f TDLS: Allow driver to request TDLS Discovery Request initiation
This extends the TDLS operation request mechanism to allow TDLS
Discovery Request to be initiated by the driver similarly to the
existing Setup and Teardown requests.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-03-06 21:08:54 +02:00
Jouni Malinen 41312fc7ef mesh: Leave mesh in driver setup if initialization fails
It was possible to leave the driver in mesh point state if upper layer
mesh initialization failed in wpa_supplicant_mesh_init(). With nl80211,
this results in the vif being left in mesh point mode instead of
restoring it to station mode. That seems to break normal functionality,
e.g., for Public Action frame TX/RX. Fix this by restoring station mode
on mesh failure path.

This error could be triggered, e.g., with the following hwsim test case
sequence: wpas_mesh_secure_sae_missing_password
nfc_p2p_static_handover_tagdev_go_forced_freq

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
2015-03-06 20:58:56 +02:00