Commit Graph

3791 Commits (7c4e92115a795dd2ee2135cf49d7e9e172fb5851)
 

Author SHA1 Message Date
Jouni Malinen 7c4e92115a Update Doxygen documentation for new version
Add src/p2p directory and work around some issues with newer Doxygen
versions disliking the wpa_supplicant prefix in labels.

Signed-hostap: Jouni Malinen <j@w1.fi>
12 years ago
Jouni Malinen 1ceb0e1778 Fix validation of PSK-from-RADIUS-server required response
cache->psk is an array and never NULL. The check here needs to check the
cache->has_psk flag instead.

Signed-hostap: Jouni Malinen <j@w1.fi>
12 years ago
Jouni Malinen fcbf0b0ca9 Sync wpa_supplicant man page with README changes
The man page source was not up-to-date with removed driver wrappers,
so bring in the wpa_supplicant/README changes to make this somewhat
closer to the current state.

Signed-hostap: Jouni Malinen <j@w1.fi>
12 years ago
Jouni Malinen eab6f5e04a Remove unnecessary EVENT_RX_MGMT data validation
Make wpa_supplicant_event() more consistent by not checking
data in either location handling EVENT_RX_MGMT events. This event
is required to specify the data so this pointer cannot be NULL.

Signed-hostap: Jouni Malinen <j@w1.fi>
12 years ago
Adrien Bustany c9b72c257a P2P: Don't rely on dictionary ordering in wpas_dbus_handler_p2p_add_service
In most languages, DBus dictionaries are mapped to either sorted maps
or hash tables, so you can't control the actual ordering of the
generated a{sv}. Relying on ordering in this method is unnecessary and
makes it use from DBus much harder.

Signed-hostap: Adrien Bustany <adrien.bustany@nokia.com>
12 years ago
Masashi Honma 78039295e6 P2P: Remove unused variable
The "type" variable is not used in wpas_p2p_deinit_global().
So this patch removes it.

Signed-hostap: Masashi Honma <masashi.honma@gmail.com>
12 years ago
Jouni Malinen 93bcb70571 Sync with include/linux/nl80211.h from wireless-testing.git
Signed-hostap: Jouni Malinen <j@w1.fi>
12 years ago
Deepthi Gowri f65a239ba4 P2P: Add provision discovery failure event
Add provisional discovery failure ctrl_iface event
(P2P-PROV-DISC-FAILURE) to indicate to the application layer in case of
PD failure.

Signed-off-by: Deepthi Gowri <deepthi@codeaurora.org>
12 years ago
Jouni Malinen b55aca4672 Fix sched_scan for max-num-of-scan_ssid=1 networks
When the network configuration includes exactly the number of
scan_ssid=1 networks as the driver supports for scan_sched and no
networks need wildcard SSID scan, there is no need to use sched_scan
timeout. Check this condition and optimize this case to avoid the extra
sched_scan start/stop operations.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
12 years ago
Jouni Malinen 7d21a223f1 Fix sched_scan debug print regarding timeout
The debug messages were showing the opposite of what the actual
implementation was doing for sched_scan timeout.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
12 years ago
Jouni Malinen 54ddd74369 Add disable_scan_offload parameter to disable automatic scan offloading
This new configuration parameter can be used to disable automatic
offloading of scan requests to the driver which was previously used
by default if the driver supported sched_scan.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
12 years ago
Jouni Malinen 5b9cecafaf P2P: Fix disallowing of pending listen command to override connect
Commit d9bdba9f86 was supposed to allow
p2p_listen to schedule new after scan operation only if a p2p_connect
operation was not pending. However, it used incorrect P2P_AFTER_SCAN_
value for this and did not actually prevent overriding of p2p_connect
and could have caused some p2p_listen operations to be skipped
unnecessarily.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
intended-for: hostap-1
12 years ago
Adrien Bustany e56fc9e81b P2P: Allow wildcard service discovery from DBus API
Using the socket command interface, it is possible to pass a NULL dst to
wpas_p2p_sd_request, however you could not do so using the D-Bus API,
since it required a valid Peer object path. This patch changes the
behavior, so that if the "peer_object" is missing from the parameters,
a NULL dst is passed to wpas_p2p_sd_request.

Signed-hostap: Adrien Bustany <adrien.bustany@nokia.com>
intended-for: hostap-1
12 years ago
Nirav Shah cca0060f1e P2P: Cleanup P2PDevice D-Bus interface for hostap-1 release
This patch cleans up the P2PDevice D-Bus interface for the hostap-1
release. A spelling error is corrected and P2PDeviceProperties is
renamed to clarify that this data is configuration data and not the
total collection of Properties for the P2PDevice interface.

Signed-hostap: Nirav Shah <nirav.j2.shah@intel.com>
Signed-hostap: Angie Chinchilla <angie.v.chinchilla@intel.com>
intended-for: hostap-1
12 years ago
Nirav Shah 445335fd86 P2P: Fix D-Bus property getters to default to "/" for Group, PeerGO
The D-Bus property getters should not return an error when the
properties are not valid/relevant. Returning an error breaks the
GetAll method in the dbus interface. Change Group and PeerGO
property getters to make GetAll work on P2PDevice.

Signed-hostap: Nirav Shah <nirav.j2.shah@intel.com>
Signed-hostap: Angie Chinchilla <angie.v.chinchilla@intel.com>
intended-for: hostap-1
12 years ago
Dmitry Shmidt 51a0c3d417 wpa_supplicant: Use bss_id list for 'bss FIRST' command
Command 'bss FISRT' should use bss_id list, because 'bss NEXT-N' is using
bss_id list as well.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years ago
Jouni Malinen 5f482d55fd P2P: Allow immediate group idle timeout configuration
A special value p2p_group_idle=-1 can now be used to configure the P2P
group idle mechanism to terminate a P2P client group immediately on any
disconnection after the completion of the initial 4-way handshake.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
12 years ago
Jouni Malinen 361cdf3400 P2P: Extend use of group formation timeout until end of 4-way handshake
Instead of relying on the P2P group idle timeout before the group
connection has been fully established, re-start the group formation
timeout in the end of the WPS provisioning step and clear it at the
successful completion of the initial 4-way handshake. This allows the
P2P group idle timeout to be set to a small value without triggering it
during the initial scan and connection attempt.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
12 years ago
Jouni Malinen 205e6474a1 P2P: Fix p2p_connect join scan handler in error cases
wpa_drv_scan() may fail for the initial p2p_connect join scan request,
e.g., if the driver happened to be scanning at the time the new
operation was initialized. Previously, a special scan result handler was
registered regardless of whether the new scan was started. This could
result in partial scan results (e.g., from p2p_find social scan) from
being used as full results for join (or now more importantly for
p2p_connect auto) purposes. Fix this by registering the new scan result
handler only if wpa_drv_scan() returns success.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
12 years ago
Jouni Malinen b31be3a0fd P2P: Add automatic GO Negotiation vs. join-a-group selection
p2p_connect command can now be used with an optional "auto" parameter
to request wpa_supplicant to determine automatically whether to use
join-a-group operation (if the peer is operating as a GO) or group
formation. This makes it easier for external programs to handle
connection type selection by offloading this to wpa_supplicant. The
previously used p2p_connect join commands can be replaced with
p2p_connect auto to use this new mechanism.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
12 years ago
Jouni Malinen 7b63c6396a P2P: Clear P2P_DEV_SD_INFO when new wildcard SD query is added
Unlike the unicast SD queries, the queries directed to all peers depend
on P2P_DEV_SD_INFO flag being cleared to allow the query to be sent to
a peer that has previously replied to any SD query.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
12 years ago
Vasanthakumar Thiagarajan 5cbf5fd9bd Allow disable_ht to override 11n configuration in AP mode
This is being done only for station mode, extend it to AP mode as well.

Signed-hostap: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
12 years ago
Jouni Malinen a625ff6059 AP: Reschedule ap_handle_timer event on (re)association
Previously, the timeout scheduled during the previous association was
used after reassociation if the STA entry had not yet been removed. The
next timeout does not need to happen that quickly, so reschedule it
during reassociation.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
12 years ago
Jouni Malinen 42ca9845be AP: Add debug information for ap_handle_timer operations
This makes it easier to figure out what exactly was done with the
ap_handle_timer registration/cancellation based on a debug log.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
12 years ago
Jouni Malinen c72bd6d49b AP: Reset STA timeout_next on driver-based-SME association
The next ap_handle_timer action was already cleared when association
is handled with user space -based SME. However, this step was missing
from the driver callback for indicating new association. This could
result in the first ap_handle_timer timeout on the new association
removing the station unexpectedly. Fix this by resetting the timeout_next
in hostapd_notif_assoc().

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
intended-for: hostap-1
12 years ago
Jouni Malinen 31b4961f02 Fix EAP/WPS to PSK transition on reassociation in authenticator
A station may move from EAP/WPS key_mgmt to PSK using re-association. In
practice, this can happen most likely with WPS when the station runs
through the provisioning step (EAP/WPS) followed by PSK authentication.
If a deauthentication event is missed from the station for whatever
reason, the EAPOL authenticator state machine could have been left
running.

This can result in various issues, including unexpected disconnection of
the station while both the 4-way handshake and EAPOL authenticator state
machines (EAP) are running at the same time when the supplicant is
trying to use PSK. Fix this by explicitly clearing EAPOL authenticator
state machine on (re)association if the new association does not use it.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
intended-for: hostap-1
12 years ago
Jithu Jance d3bd0f057c nl80211: Extend shared_freq to handle AP/GO mode interfaces
Signed-hostap: Jithu Jance <jithu@broadcom.com>
12 years ago
Jouni Malinen 86ae2e8a42 P2P: Fix shared freq check and support AP mode validation
The previous commit did not use the correct pointer in all operations
and was specific to station mode interfaces. Fix and extend it to work
with AP/GO interfaces, too.

Signed-hostap: Jouni Malinen <j@w1.fi>
12 years ago
Jouni Malinen 4b15620609 P2P: Abort join-group operation if concurrent group cannot be supported
If the driver does not indicate support for multi-channel concurrency,
abort join-group operation if the end result would result in use of
multiple operating frequencies with the same radio.

Signed-hostap: Jouni Malinen <j@w1.fi>
12 years ago
Jouni Malinen 7fa56233ae Scan only affected frequencies for 20/40 MHz co-ex check for
When starting an AP with HT40 on 2.4 GHz, limit the set of channels
to scan for based on the affected frequency range to speed up the
AP setup.

Signed-hostap: Jouni Malinen <j@w1.fi>
12 years ago
Jouni Malinen 3208b5a0fe Make random_add_randomness() debug print less verbose
Mark the debug print excessive and print it only in case the entropy
collection is used since this function can get called pretty frequently.

Signed-hostap: Jouni Malinen <j@w1.fi>
12 years ago
Jouni Malinen 9f98810c5d TLS: Use separate TLS library context for tunneled TLS
OpenSSL wrapper was using the same certificate store for both Phase 1
and Phase 2 TLS exchange in case of EAP-PEAP/TLS, EAP-TTLS/TLS, and
EAP-FAST/TLS. This would be fine if the same CA certificates were used
in both phases, but does not work properly if different CA certificates
are used. Enforce full separation of TLS state between the phases by
using a separate TLS library context in EAP peer implementation.

Signed-hostap: Jouni Malinen <j@w1.fi>
12 years ago
Jouni Malinen d755e01b34 Remove forgotten GPL language from man pages and README files
Signed-hostap: Jouni Malinen <j@w1.fi>
12 years ago
Jouni Malinen 705a013b60 Android: Sync build configuration with defconfig changes
This brings up the changes from defconfig into the Android configuration
file, but does not change any of the actual build parameters.

Signed-hostap: Jouni Malinen <j@w1.fi>
12 years ago
Jouni Malinen 763a66f471 Remove experimental Symbian build
This was never really completed and is of not much use at this point,
so clean up the repository by removing the Symbian-specific changes.

Signed-hostap: Jouni Malinen <j@w1.fi>
12 years ago
Dmitry Shmidt eff1a95b97 Add RANGE=ALL|N1-N2 selection for ctrl_iface BSS command
Add ability to get information about several BSS's in one call.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years ago
Dmitry Shmidt 5f97dd1c57 Add MASK=0xH option for the ctrl_iface BSS command
This optional parameter to the BSS command can be used to select which
fields are included in the output to avoid having to parse through
unneeded information and to reduce the buffer size.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years ago
Dmitry Shmidt 61ce90857e Move ctrl_iface BSS command response generation into a separate function
This is in preparation for allowing multiple BSS entries to be fetched
with a single command.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
12 years ago
Jouni Malinen 873d0fcfd3 nl80211: Skip set_mode event subscription during deinit
There is no need to subscribe to event messages during deinit process,
so skip this to avoid unnecessary operations and to keep the debug logs
a bit cleaner.

Signed-hostap: Jouni Malinen <j@w1.fi>
12 years ago
Nirav Shah 103b8f4dea P2P: Disconnect P2P group on supplicant deinit
When a supplicant is deinited and shutting, disconnect from P2P groups.
This fixes a memory leak on variable dbus_groupobj_path on exiting
supplicant.

Signed-hostap: Nirav Shah <nirav.j2.shah@intel.com>
Signed-hostap: Angie Chinchilla <angie.v.chinchilla@intel.com>
12 years ago
Angie Chinchilla eb6f8c2bd4 P2P: Fix crash for failure case when WSC PIN is entered incorrectly
When forming a P2P group using WSC PIN method, if the PIN is entered
incorrectly the P2P client supplicant instance will crash as a result
of cleanup happening on data that is still in use in a case where a
separate P2P group interface is used.

For example, here is the path for the first crash:
eap_wsc_process():
- creates struct wpabuf tmpbuf; on the stack
- sets data->in_buf = &tmpbuf;
- calls wps_process_msg()
- which calls wps_process_wsc_msg()
- which, in case WPS_M4: calls wps_fail_event()
- which calls wps->event_cb()
- wps->event_cb = wpa_supplicant_wps_event()
- wpa_supplicant_wps_event()
- wpa_supplicant_wps_event_fail()
- which calls wpas_clear_wps()
- which calls wpas_notify_network_removed()
- which calls wpas_p2p_network_removed()
- which calls wpas_p2p_group_formation_timeout()
- which calls wpas_group_formation_completed()
- which calls wpas_p2p_group_delete()
- which calls wpa_supplicant_remove_iface()
- which calls wpa_supplicant_deinit_iface()
- which calls wpa_supplicant_cleanup()
- which calls eapol_sm_deinit()
- ... which eventually uses the ptr data->in_buf to free tmpbuf, our
stack variable and then the supplicant crashes

If you fix this crash, you'll hit another. Fix it and then a segfault.
The way we're cleaning up and deleting data from under ourselves here
just isn't safe, so make the teardown portion of this async.

Signed-hostap: Angie Chinchilla <angie.v.chinchilla@intel.com>
Signed-hostap: Nirav Shah <nirav.j2.shah@intel.com>
intended-for: hostap-1
12 years ago
Jouni Malinen 4f920dc63e Do not write bg_scan_period value if default (-1) has not been changed
There is no need to force this configuration parameter to be written
into the configuration file for each network block that has not modified
the default value.

Signed-hostap: Jouni Malinen <j@w1.fi>
12 years ago
Angie Chinchilla 540609c55f Clarify comment in wpa_supplicant/defconfig
I think this comment, as originally stated, says the opposite of
what is meant. Reword to help the next guy.

Signed-hostap: Angie Chinchilla <angie.v.chinchilla@intel.com>
12 years ago
Ed Wildgoose af548f5320 Save bgscan parameter into configuration file
Signed-off-by: Ed Wildgoose <lists@wildgooses.com>
intended-for: hostap-1
12 years ago
Neeraj Kumar Garg c772ef43f6 P2P: Update BSS entries in P2P group interface only if P2P IE is present
For concurrency scenarios we should not update the scan results without
P2P IE to P2P group interfaces. This patch is to take care if a scan has
been requested on STA interface and scan results are getting updated
from sibling to P2P group interface. A P2P GO Probe Response for a
legacy STA scan would be without P2P IE. So it will wrongly update the
BSS list of P2P group interface too when results are updated from
sibling.

Since P2P group interfaces are used only for connecting to a P2P group,
it is fine to filter out all non-P2P entries from their BSS table.

Signed-off-by: Neeraj Garg <neerajkg@broadcom.com>
12 years ago
Ben Greear 5a49459ee8 Better wpa_cli error messages when connect fails
Signed-hostap: Ben Greear <greearb@candelatech.com>
12 years ago
Ben Greear 9d05374796 Make bind failure messages unique
This helps someone know which part of the code is complaining.

Signed-hostap: Ben Greear <greearb@candelatech.com>
12 years ago
Ben Greear bae489d292 wpa_supplicant: Print initialization information on startup
This lets someone know if they have a log file that properly
starts at the beginning.

Signed-hostap: Ben Greear <greearb@candelatech.com>
12 years ago
Ben Greear ce28e2795a AP: Add fuzz to idle-timer calculations
This should keep us from getting into a state where we bounce large
numbers of stations all at once. Spreading out the bounce should cause
less stress on the network as the idle stations won't all be trying to
reconnect at once.

Signed-hostap: Ben Greear <greearb@candelatech.com>
12 years ago
Johannes Berg f05b6b18bb Add script to convert wpa_supplicant debug output to pcap
For debugging I needed to look at the frames in a wpa_supplicant debug
log. Looking at the hexdump is a bit tedious, so I wrote a quick script
to convert the nl80211 debugging output to a PCAP file that can be
opened in wireshark.

I've polished the initial raw script a bit to add error messages and to
also record the timestamps to the pcap file.

Hopefully it's useful to somebody else as well.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
12 years ago