Max Stepanov [Wed, 10 Jun 2015 08:43:31 +0000 (11:43 +0300)]
P2P: Add rx_freq parameter to Probe Request frame handler
In some cases, Probe Request frames can be received by a peer not only
on a listen channel. In this case an additional rx_freq parameter
explitly contains a Probe Request frame RX frequency. In case rx_freq is
set to 0, a Probe Request frame RX channel is assumed to be our own
listen channel (p2p->cfg->channel).
Signed-off-by: Max Stepanov <Max.Stepanov@intel.com>
Reviewed-by: Ilan Peer <ilan.peer@intel.com>
Jouni Malinen [Sun, 14 Jun 2015 20:14:26 +0000 (23:14 +0300)]
P2P: Update target GO Device Address from BSS entry during join
It is possible for P2P_CONNECT-join command to be issued on a GO's P2P
Interface Address before the P2P peer entry is available to map this
into the GO's P2P Device Address. This could result in the join
operation failing to continue after receiving PD Response due to the
address mismatch (source address = P2P Device Address while only the P2P
Interface Address is known). Fix this by updating the pending join P2P
Device Address based on the BSS entry, if needed.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 14 Jun 2015 16:35:19 +0000 (19:35 +0300)]
tests: IBSS on 5 GHz band
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 14 Jun 2015 15:11:14 +0000 (18:11 +0300)]
tests: WNM BSS Transition Management in different countries
This increases testing coverage for ieee802_chan_to_freq*() functions.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 14 Jun 2015 14:40:10 +0000 (17:40 +0300)]
Remove duplicated country code from operating class lists
CA country code was included mistakenly (copy-paste..) in cn_op_class_cc
while it was supposed to be included only in us_op_class_cc. In
practice, this did not result in incorrect operation due to the
us_op_class_cc list being checked first. Anyway, better fix
cn_op_class_cc to avoid confusion here.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 14 Jun 2015 13:47:29 +0000 (16:47 +0300)]
tests: Additional ieee802_11_parse_elems() module test coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 14 Jun 2015 13:27:21 +0000 (16:27 +0300)]
tests: Module test for gas.c corner cases in gas_anqp_set_len()
This increases code coverage for gas.c testing to cover areas that
cannot be reached with pure hwsim test cases.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 14 Jun 2015 13:17:33 +0000 (16:17 +0300)]
tests: GAS/ANQP query and OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
Michael Braun [Mon, 27 Apr 2015 07:08:04 +0000 (09:08 +0200)]
tests: Verify correct VLAN operation in multi-BSS multi-VLAN case
This adds hwsim test ap_vlan_iface_cleanup_multibss. It connects two
stations in different BSS but the same hostapd process. First both
stations are in VLAN 1, then they get reauthenticated into VLAN 2. Due
to the ordering of the stations moving around, this test checks that
bridge and tagged interface referencing counting is done globally, such
that the tagged interface is not removed too early and no bridge is
left over.
Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
Michael Braun [Mon, 27 Apr 2015 07:08:03 +0000 (09:08 +0200)]
Fix removal of tagged interface and bridge when multiple BSS share them
Currently, if multiple bss share are bridge and tagged vlan interface,
only the first instance of struct hostapd_vlan for this vlanid will have
the DVLAN_CLEAN_VLAN flag added. Thus, when this instance is removed,
the tagged vlan interface will be removed from bridge, thought other bss
might still need it. Similarily, the bridge will be left over, as the
does not have zero ports when the first instance of a struct
hostapd_vlan is freed.
This patch fixes this by having a global (per process) reference counter
for dynamic tagged vlan and dynamically created bridge interfaces, so
they are only removed after all local users are freed. (struct
hapd_interfaces *)->vlan_priv is used to hold src/ap/vlan_init.c global
per-process data like drv_priv does; right now this is only used for the
interface reference counting, but could get extended when needed. Then
possibly some vlan_global_init / vlan_global_deinit should be added, but
this is not required right now.
Additionally, vlan->configured is checked to avoid reference counter
decreasing before vlan_newlink increased them.
In order to avoid race conditions, vlan_dellink is called explicitly
after hostapd_vlan_if_remove. Otherwise there would be a short timeframe
between hostapd_vlan_if_remove and vlan_dellink during which the struct
hostapd_vlan still exists, so ap_sta_bind_vlan would try to attach
stations to it.
Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
Purushottam Kushwaha [Fri, 12 Jun 2015 11:36:27 +0000 (11:36 +0000)]
Combine multiple function calls to a single statement
This cleans up p2p_ctrl_group_add() to share a single call to
wpas_p2p_group_add().
Signed-off-by: Purushottam Kushwaha <p.kushwaha@samsung.com>
Jouni Malinen [Sun, 14 Jun 2015 08:38:14 +0000 (11:38 +0300)]
tests: D-Bus Reconnect command
Signed-off-by: Jouni Malinen <j@w1.fi>
MAYANK HAARIT [Fri, 12 Jun 2015 11:27:19 +0000 (11:27 +0000)]
dbus: Add Reconnect command to D-Bus Interface
This has same behavior as the ctrl_iface RECONNECT command.
Signed-off-by: Mayank Haarit <mayank.h@samsung.com>
Signed-off-by: Purushottam Kushwaha <p.kushwaha@samsung.com>
MAYANK HAARIT [Fri, 12 Jun 2015 07:26:10 +0000 (07:26 +0000)]
doc: Update D-Bus GONegotiationRequest Signal: add device_go_intent
This new parameter was added by commit
aa2b12562b6e70fe48c7ce4abebf094206a9332a ('P2P: Add GO Intent of
connecting device in GO Negotiation Request event').
Signed-off-by: Rahul Jain <rahul.jain@samsung.com>
Signed-off-by: Mayank Haarit <mayank.h@samsung.com>
Jouni Malinen [Fri, 12 Jun 2015 18:28:14 +0000 (21:28 +0300)]
tests: Make flush_scan_cache() more robust
There seem to be cases where flush_scan_cache() was unable to clear all
BSS entries due to a hidden SSID BSS (SSID length 0) showing up again
from cfg80211 BSS table. Check for this and run the flush operation
again if any entries remain.
This fixes an issue where the following hwsim test case sequence
resulted in the last test case failing due to the old BSS entry from the
first test case being in place and showing unexpected flags information:
ap_hs20_min_bandwidth_home_hidden_ssid_in_scan_res
ap_hs20_remediation_required
ap_mixed_security
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Fri, 12 Jun 2015 17:54:01 +0000 (20:54 +0300)]
tests: P2P GO and 5 GHz channels 165 (allowed) and 169 (disallowed) in US
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Amr BEN ABDESSALEM [Thu, 2 Apr 2015 16:22:58 +0000 (18:22 +0200)]
P2P: Add Operating class 125 for P2P supported channels
Add operating class 125 (channels 149..169) to the list of P2P supported
channels. This allows the 5 GHz channels 161 and 169 to be used for P2P
GO when those channels are allowed for AP mode in the current regulatory
domain.
Signed-off-by: Amr BEN ABDESSALEM <amrx.ben.abdessalem@intel.com>
Jouni Malinen [Wed, 10 Jun 2015 23:40:13 +0000 (02:40 +0300)]
tests: Pending GAS query interrupted with deinit
These are regression test cases for a segmentation fault issue (use of
freed memory) where interface removal happened while a gas-query item
was pending.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Ilan Peer [Mon, 1 Jun 2015 10:38:10 +0000 (13:38 +0300)]
GAS: Remove all radio works before calling gas_query_deinit()
Remove all gas-query radio works before calling gas_query_deinit()
as gas_query_deinit() flow frees the query context, which might
be later be accessed from the radio work callback (and result
with unexpected behavior, e.g., segmentation fault).
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Jouni Malinen [Wed, 10 Jun 2015 20:49:01 +0000 (23:49 +0300)]
tests: Create a P2P persistent group with ADD_NETWORK
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Wed, 10 Jun 2015 20:58:21 +0000 (23:58 +0300)]
P2P: Fix persistent group profile on manual disabled=2 change
ssid->p2p_persistent_group was left to its old value when changing a
network profile to/from P2P persistent group type (disabled=2). This
could result in unexpected behavior when using an incomplete persistent
group profile. This was mainly visible through D-Bus network profile
handling where a persistent group would not be unregistered insome
cases.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Wed, 10 Jun 2015 16:41:28 +0000 (19:41 +0300)]
tests: D-Bus WPS/PBC operation and signal for PBC overlap
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Avichal Agarwal [Fri, 5 Jun 2015 12:46:51 +0000 (18:16 +0530)]
D-Bus: Add WPS pbc-overlap Event
This sends an Event D-Bus signal with name "pbc-overlap" for
WPS-EVENT-OVERLAP.
Signed-off-by: Avichal Agarwal <avichal.a@samsung.com>
Amit Khatri [Wed, 10 Jun 2015 10:06:09 +0000 (10:06 +0000)]
P2P: Add ModelNumber and SerialNumber info into D-Bus peer interface
Signed-off-by: Amit Khatri <amit.khatri@samsung.com>
Signed-off-by: Rahul Jain <rahul.jain@samsung.com>
Amit Khatri [Wed, 10 Jun 2015 10:06:09 +0000 (10:06 +0000)]
P2P: Add ModelName info into D-Bus peer interface
Signed-off-by: Amit Khatri <amit.khatri@samsung.com>
Signed-off-by: Rahul Jain <rahul.jain@samsung.com>
Amit Khatri [Wed, 10 Jun 2015 10:06:09 +0000 (10:06 +0000)]
doc: Add missing ListenChannel to P2P information
Signed-off-by: Amit Khatri <amit.khatri@samsung.com>
Signed-off-by: Rahul Jain <rahul.jain@samsung.com>
Jouni Malinen [Fri, 6 Feb 2015 10:08:28 +0000 (12:08 +0200)]
Document the wpa_msg_cb "global" parameter
Instead of an int variable with magic values 0, 1, 2, use an enum that
gives clearer meaning to the values now that the original boolean type
global argument is not really a boolean anymore.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Wed, 10 Jun 2015 12:40:35 +0000 (15:40 +0300)]
Do not set own_disconnect_req flag if not connected
This fixes some issues where a disconnection event may get ignored if an
earlier operation to remove or disable a network resulted in an attempt
to disconnect event though no connection was in place.
wpa_s->current_ssid != NULL alone is not sufficient to determine that
there will be a driver event notifying completion of such disconnection
request. Set own_disconnect_req to 1 only if wpa_s->wpa_state is also
indicating that there is a connection or an attempt to complete one.
This showed up in a failure, e.g., when running the hwsim test case
scan_int followed by ap_vlan_wpa2_psk_radius_required where the latter
ended up not processing a connection failure event and getting stuck not
trying to run a new scan and connection attempt.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jason A. Donenfeld [Fri, 8 May 2015 21:01:01 +0000 (23:01 +0200)]
wpa_gui: Port to Qt5
This adds support for Qt5 while still preserving support for building
with Qt4. The same source code builds with both Qt versions now. The
functionality should be identical.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Ondřej Caletka [Thu, 21 May 2015 14:24:56 +0000 (16:24 +0200)]
eapol_test: Support IPv6 for authentication server
This allows testing RADIUS servers over IPv6.
Signed-off-by: Ondřej Caletka <ondrej@caletka.cz>
Jouni Malinen [Wed, 25 Mar 2015 09:41:26 +0000 (11:41 +0200)]
Fix pairwise cipher suite bitfields to the driver in mixed mode
Commit
95b6bca66de9dc0a2ddd9164ec052a7d5f58804b ('Add rsn_pairwise bits
to set_ieee8021x() driver_ops') modified cipher configuration to use
unconditionally wpa_pairwise | rsn_pairwise. While that works for many
cases, it does not handle the case of dynamic configuration changes over
the control interface where wpa_pairwise or rsn_pairwise values may not
get cleared when the wpa parameter is modified. Fix this inconsistency
by configuring the driver with only the bits that are valid for the
currently enabled WPA/WPA2 version(s).
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Wed, 10 Jun 2015 10:41:54 +0000 (13:41 +0300)]
Remove [MU-BEAMFORMEE] option from hostapd vht_capab parameter
The standard hardcodes the MU Beamformee Capable subfield is hardcoded
to 0 when transmitting by an AP, so there is no need to provide a
configuration parameter for setting this to one.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Tue, 9 Jun 2015 19:03:53 +0000 (22:03 +0300)]
Fix spelling of initialize in a comment and an error message
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
MAYANK HAARIT [Tue, 2 Jun 2015 05:47:33 +0000 (05:47 +0000)]
P2P: Add GO Intent of connecting device in GO Negotiation Request event
Add GO Intent information of connecting device in GO Negotiation Request
event which will help applications to decide its own GO intent value in
advance and can avoid failure cases when both devices use GO Intent 15
depending on application requirement.
Signed-off-by: Mayank Haarit <mayank.h@samsung.com>
Jouni Malinen [Sat, 6 Jun 2015 15:15:23 +0000 (18:15 +0300)]
tests: Allow D-Bus GONegotiationRequest signal to include extra argument
This is needed to allow the GO Intent argument to be added without
breaking these test cases.
Signed-off-by: Jouni Malinen <j@w1.fi>
Amit Khatri [Wed, 3 Jun 2015 11:19:27 +0000 (16:49 +0530)]
doc: Fix a typo in D-Bus API document
Signed-off-by: Amit Khatri <amit.khatri@samsung.com>
Signed-off-by: Rahul Jain <rahul.jain@samsung.com>
Alan T. DeKok [Thu, 4 Jun 2015 20:53:06 +0000 (16:53 -0400)]
Set Acct-Session-Id from os_get_random() instead of os_get_time()
So that systems with bad clocks will send random session IDs,
instead of always ones starting at the same second.
If os_get_random() isn't available, use os_get_time(). But also
mix in now.tv_usec, so that the accounting session ID is more
likely to be globally and temporally unique.
Signed-off-by: Alan DeKok <aland@freeradius.org>
MAYANK HAARIT [Wed, 3 Jun 2015 05:39:34 +0000 (05:39 +0000)]
OpenSSL: Fix build iwth OpenSSL 0.9.8
The OPENSSL_VERSION_NUMBER < 0x00909000L case of
openssl_get_keyblock_size() had not been kept in sync with the cleanup
changes.
Signed-off-by: Mayank Haarit <mayank.h@samsung.com>
Jouni Malinen [Sat, 6 Jun 2015 14:13:21 +0000 (17:13 +0300)]
tests: More WPA2-EAP + PMF test coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Fri, 5 Jun 2015 12:32:08 +0000 (15:32 +0300)]
tests: Control interface behavior on scan SSID parameter
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Krishna Vamsi [Thu, 21 May 2015 13:59:31 +0000 (19:29 +0530)]
Add support to request a scan with specific SSIDs
Support a request to scan specific SSIDs given by user with the SCAN
command. The SSID list can be suffixed to the scan command as follows.
For example, if SSIDs "ABC" and "abc123" need to be specifically
scanned, the command should be "SCAN ssid 414243 ssid
616263313233". The
value of the SSID is passed in hexadecimal representation.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Thu, 4 Jun 2015 11:04:16 +0000 (14:04 +0300)]
tests: wps_priority in configuration and WPS behavior
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Sunil Dutt [Mon, 25 May 2015 13:12:24 +0000 (18:42 +0530)]
WPS: Allow the priority for the WPS networks to be configured
This commit adds a configurable parameter (wps_priority) to specify the
priority for the networks derived through WPS connection.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Anton Nayshtut [Sun, 16 Nov 2014 15:28:53 +0000 (17:28 +0200)]
wpa_supplicant: Remove trailing whitespace
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Mon, 1 Jun 2015 15:56:19 +0000 (18:56 +0300)]
hostapd: Make sure band selection does not result in NULL dereference
Explicitly check for iface->current_mode before dereferencing it. While
this case may not happen in practice, it is better for the setup
functions to be more careful when doing the initial band selection.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Amit Khatri [Thu, 28 May 2015 12:19:46 +0000 (17:49 +0530)]
P2P: Add manufacturer info into D-Bus peer interface
Allow the Manufacturer information for a found P2P peer device to be
fetched through the D-Bus interface similarly to p2p_peer <mac address>
on ctrl interface.
Signed-off-by: Amit Khatri <amit.khatri@samsung.com>
Signed-off-by: Rahul Jain <rahul.jain@samsung.com>
Signed-off-by: Ashutosh Kaushik <k.ashutosh@samsung.com>
Jouni Malinen [Fri, 29 May 2015 18:13:31 +0000 (21:13 +0300)]
tests: D-Bus P2P Cancel
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Nishant Chaprana [Tue, 26 May 2015 05:05:47 +0000 (10:35 +0530)]
P2P: Add P2P Cancel method over D-Bus interface
This patch adds P2P Cancel method over
fi.w1.wpa_supplicant1.Interface.P2PDevice dbus interface.
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
Jouni Malinen [Fri, 29 May 2015 18:00:02 +0000 (21:00 +0300)]
tests: D-Bus WPS Cancel operation
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Nishant Chaprana [Tue, 26 May 2015 04:08:39 +0000 (09:38 +0530)]
WPS: Add WPS Cancel method over D-Bus interface
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
Purushottam Kushwaha [Fri, 29 May 2015 09:20:41 +0000 (09:20 +0000)]
P2P: Fix a potential memory leak in a P2P+NFC corner case
Avoid memory leak due to previous allocation for ssid->ssid. It does not
look like this is hit in normal cases, but at might be possible for the
SSID to get set if the peer is present in previous scan results and WPS
code ends up copying the SSID from there.
Signed-off-by: Purushottam Kushwaha <p.kushwaha@samsung.com>
Krishna Vamsi [Fri, 8 May 2015 22:32:36 +0000 (15:32 -0700)]
Add libwpa_client build option to use a dynamic library
Add support to compile libwpa_client.so. This can be used by external
programs to interact with the wpa_supplicant control interface. Also
rename the static version of this library to libwpa_client.a to be
consistent with the name used previous in Android builds.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Fri, 29 May 2015 10:34:22 +0000 (13:34 +0300)]
tests: P2P group re-invocation with invitation response getting lost
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Krishna Vamsi [Thu, 28 May 2015 14:17:41 +0000 (19:47 +0530)]
P2P: Restart group formation timer upon receiving new Inv Req
A new Invitation Request might be received on a just started persistent
group if the previous Invitation Response sent isn't received at the
peer (GO of the persistent group). When the peer sends an Invitation
Request again, treat it as start of group formation and restart the
group formation timer at this point of time.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Sunil Dutt [Thu, 28 May 2015 15:11:12 +0000 (20:41 +0530)]
Postpone updating of wpa_s->current_bss till association event
In the case of driver-based BSS selection, a bssid_hint in the connect
request might not result in to the selection of the same BSS. Thus,
postpone the updation of the wpa_s->current_bss till the association
event is received unless the BSSID is forced. This fixes issues where
wpa_s->current_bss may end up being updated to point to the BSS that
wpa_supplicant provided as a hint for a roaming case, but then not
restored if the driver decides to "return" to the current BSS instead.
This could result in some operations (e.g., WNM BSS TM response) not
working properly due to incorrect BSS being identified in
wpa_s->current_bss.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Peng Xu [Fri, 8 May 2015 17:53:08 +0000 (10:53 -0700)]
Extend hw_mode to support any band for offloaded ACS case
When device supports dual band operations with offloaded ACS, hw_mode
can now be set to any band (hw_mode=any) in order to allow ACS to select
the best channel from any band. After a channel is selected, the hw_mode
is updated for hostapd.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Ben Greear [Tue, 26 May 2015 20:47:34 +0000 (16:47 -0400)]
HS 2.0: hs20-client: Fix hostname extraction from URL
It was not properly handling cases like this:
https://foo.local:443
Signed-off-by: Ben Greear <greearb@candelatech.com>
Ben Greear [Tue, 26 May 2015 20:47:33 +0000 (16:47 -0400)]
HS 2.0: Fix hs20_spp_server compile error
Need to add a new -I path to get it to compile.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Ben Greear [Tue, 26 May 2015 20:47:32 +0000 (16:47 -0400)]
HS 2.0: spp-client: Warn user if xml file cannot be found
Otherwise, all you get is a cryptic XML validation error out
of the SPP server.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Ilan Peer [Tue, 12 May 2015 14:39:58 +0000 (17:39 +0300)]
P2P: Use p2p_init_wpa_s for P2P command redirection over D-Bus
D-Bus used the p2p_dev member in struct wpa_supplicant to track the
interface used for P2P Device operations. However, this is not needed as
the interface used for P2P Device operations is stored in struct
wpa_global->p2p_init_wpa_s.
Replace all the redirections to wpa_s->p2p_dev with redirections to
wpa_s->global->p2p_init_wpa_s and removed this member as it is no
longer needed.
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Jouni Malinen [Mon, 25 May 2015 15:21:05 +0000 (18:21 +0300)]
P2P: Fix D-Bus PresenceRequest to use group interface
This command is for a specific P2P group, not for the P2P Device
instance and as such, wpa_s pointer must not be replaced with the
interface that is used for P2P Device management.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Ilan Peer [Tue, 12 May 2015 14:40:01 +0000 (17:40 +0300)]
P2P: Fix wpas_remove_persistent_peer() to use P2P mgmt interface
The function used wpa_s->parent->conf to iterate the P2P networks and
update the configuration file. However, wpa_s->parent is not
necessarily the interface used to manage the P2P Device operations.
Fix this by accessing the configuration file of the interface
initialized to manage the P2P Device operations.
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Ilan Peer [Tue, 12 May 2015 14:40:00 +0000 (17:40 +0300)]
P2P: Fix wpas_p2p_add_persistent_group_client() to use P2P mgmt interface
The function used wpa_s->parent->conf to iterate the P2P networks and
update the configuration file. However, wpa_s->parent is not
necessarily the interface used to manage the P2P Device operations.
Fix this by accessing the configuration file of the interface initialized
to managed the P2P Device operations.
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Ilan Peer [Tue, 12 May 2015 14:39:59 +0000 (17:39 +0300)]
P2P: Fix wpas_p2p_set_own_freq_preference() to use P2P mgmt interface
wpas_p2p_set_own_freq_preference() accessed wpa_s->parent->conf to test
if p2p_ignore_shared_freq is set, but wpa_s->parent is not necessarily
the interface used to manage the P2P Device operations.
Fix this by accessing the configuration file of the interface
initialized to manage the P2P Device operations.
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Ben Rosenfeld [Tue, 12 May 2015 14:39:57 +0000 (17:39 +0300)]
P2P: Use the P2P Device management interface in wpas_p2p_remove_client()
As wpas_p2p_remove_client() is not necessarily called from the interface
used to manage the P2P Device operations, when removing a client, use
the P2P management interface to iterate over the saved networks and
remove the relevant entries form the P2P GO network blocks.
Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
Jouni Malinen [Mon, 25 May 2015 15:08:27 +0000 (18:08 +0300)]
tests: D-Bus FindStopped signal
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Nishant Chaprana [Wed, 13 May 2015 12:03:48 +0000 (17:33 +0530)]
P2P: Add D-Bus FindStopped to notify P2P-FIND-STOPPED event
Add D-Bus notification mechanism of P2P-FIND-STOPPED event on
fi.w1.wpa_supplicant1.Interface.P2PDevice interface.
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
Sunil Dutt [Sat, 9 May 2015 09:25:03 +0000 (14:55 +0530)]
P2P: Advertize cross connection to WLAN AP on a non-P2P interface
Commit
1c2aa04c96626f5b000d167bb5274a8c39b7dac2 ('P2P: Do not add P2P
IEs on P2P disabled interface') removed the P2P IEs from association on
non-P2P interface. However, an AP functioning as a P2P manager needs the
cross connection capability of the station (P2P Device). This needs to
be done to meet the P2P specification requirements even if the station
interface has p2p_disabled=1 in case P2P in general is enabled.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Jouni Malinen [Sun, 24 May 2015 10:44:42 +0000 (13:44 +0300)]
wlantest: Fix a copy-paste error in a debug message
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 17 May 2015 22:21:50 +0000 (01:21 +0300)]
tests: UPDATE_BEACON to change vendor_elements at runtime
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 24 May 2015 10:36:16 +0000 (13:36 +0300)]
tests: EAP-EKE with server OOM
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 24 May 2015 09:48:52 +0000 (12:48 +0300)]
tests: WPA2-Enterprise connection using EAP-EKE with serverid NAI
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 24 May 2015 09:01:25 +0000 (12:01 +0300)]
tests: ERP with EAP-EKE
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 24 May 2015 08:58:45 +0000 (11:58 +0300)]
EAP-EKE: Add Session-Id
While RFC 6124 does not define how Session-Id is constructed for
EAP-EKE, there seems to be consensus among the authors on the
construction. Use this Type | Nonce_P | Nonce_S construction based on
the following email:
From: Yaron Sheffer <yaronf.ietf at gmail.com>
To: ietf at ietf.org
Date: Wed, 17 Nov 2010 13:13:42 +0200
Expanding on my previous response, I suggest to resolve Bernard's
concern by adding the following text:
5.6 EAP Key Generation
EAP-EKE can be used for EAP key generation, as defined by [RFC 5247].
When used in this manner, the values required to establish the key
hierarchy are defined as follows:
- Peer-Id is the EAP-EKE ID_P value.
- Server-Id is the EAP-EKE ID_S value.
- Session-Id is the concatenated Type | Nonce_P | Nonce_S, where Type is
the method type defined for EAP-EKE in [Sec. 4.1], a single octet.
Thanks,
Yaron
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 24 May 2015 08:24:35 +0000 (11:24 +0300)]
tests: EAP-TTLS with server certificate valid beyond UNIX time 2^31
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 24 May 2015 08:03:42 +0000 (11:03 +0300)]
tests: DH params with 2048-bit key
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 24 May 2015 07:47:21 +0000 (10:47 +0300)]
Increase DH key size in the hostapd.conf example
OpenSSL is moving to use 2048-bit DH key size as the default with
dhparam. Increase the value in the hostapd.conf to match that to reduce
likelihood of ending up using a shorter key.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Sun, 24 May 2015 07:43:44 +0000 (10:43 +0300)]
tests: Automatic channel selection with chanlist set
Signed-off-by: Jouni Malinen <j@w1.fi>
Srinivasa Duvvuri [Fri, 15 May 2015 03:35:09 +0000 (20:35 -0700)]
ACS: Scan only channels specified in the channel list
The ACS code part of hostapd scans all the channels even if the channel
list is specified in the hostapd.conf. Limit the ACS scan channels to
the list specified in the config file.
Signed-off-by: Srinivasa Duvvuri<sduvvuri@chromium.org>
Jouni Malinen [Sun, 24 May 2015 07:33:26 +0000 (10:33 +0300)]
WPS: Fix build without CONFIG_WPS=y
Commit
5add4101626b23c11f073630770896465d9cc8f3 ('WPS: Use shorter
authentication timeout during no-SelReg iteration') broke the build with
WPS disabled.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Fri, 8 May 2015 15:21:54 +0000 (18:21 +0300)]
tests: Fix persistent_group_per_sta_psk for P2P Device case
The dev[1] <--> dev[2] data connectivity test was using incorrect
function. dev[2] is also using a P2P group and as such, can have a
different group interface.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Fri, 8 May 2015 15:15:56 +0000 (18:15 +0300)]
tests: Fix go_neg_with_bss_connected with P2P Device
Group interface name was fetched from the results of an incorrect group
formation and because of this, group removal failed in case P2P Device
is used and dev[1] ends up getting different group ifname for the
groups.
Signed-off-by: Jouni Malinen <j@w1.fi>
Jouni Malinen [Fri, 8 May 2015 14:59:52 +0000 (17:59 +0300)]
tests: Add P2P Device support for persistent_group
The network operations need to use the global control interface to be
performed on the interface that stores the network profiles for
persistent groups.
Signed-off-by: Jouni Malinen <j@w1.fi>
Ben Rosenfeld [Tue, 5 May 2015 09:37:04 +0000 (12:37 +0300)]
tests: Update group_ifname after group start
After P2P-GROUP-STARTED event, use group_form_result in order to update
the group_ifname for the device. This is needed when using P2P Device
for managing P2P operations which results in a separate group interface
being used.
Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
Ben Rosenfeld [Tue, 5 May 2015 09:37:03 +0000 (12:37 +0300)]
tests: Use list_networks with p2p=true in test_p2p_channel
In case that there is a need to list the persistent P2P networks,
the global control interface needs to be used.
Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
Ben Rosenfeld [Tue, 5 May 2015 09:37:00 +0000 (12:37 +0300)]
tests: Change persistent_go_client_list to use global interface
Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
Ben Rosenfeld [Tue, 5 May 2015 09:36:59 +0000 (12:36 +0300)]
tests: Use global interface in persistent_group_invite_removed_client
When removing a persistent P2P group, global interface needs to be used.
Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
Ben Rosenfeld [Tue, 5 May 2015 09:36:58 +0000 (12:36 +0300)]
tests: Change list_networks() to use global interface with P2P
list_networks() always used the wlanX control interface to query for the
current list of networks. However, when a dedicated P2P Device is used,
the global control interface should be used when checking persistent
group network profiles.
Fix this by adding an optional parameter indicating that the P2P
networks are requested, and in such a case use the global control
interface.
In addition update test_p2p_persistent to use the argument when needed.
Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
Ben Rosenfeld [Tue, 5 May 2015 09:36:57 +0000 (12:36 +0300)]
tests: Change persistent_group_per_sta_psk to use global interface
This is required for cases that a dedicated P2P Device interface
is used and then the event will happen on the global interface.
Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
Ben Rosenfeld [Tue, 5 May 2015 09:36:53 +0000 (12:36 +0300)]
tests: Change test_p2p_persistent to use the global control interface
Send request to set persistent_reconnect on the global control
interface so it would also work when using a dedicated P2P Device
interface.
Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
Ben Rosenfeld [Tue, 5 May 2015 09:37:05 +0000 (12:37 +0300)]
tests: Change p2p_device_nfc_invite to use global interface
When testing P2P invitation flow, setting the NFC selector
should be done using the global control interface.
Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
Ben Rosenfeld [Tue, 5 May 2015 09:37:01 +0000 (12:37 +0300)]
tests: Change p2p_device_misuses() to use group interface
Calling "DISASSOCIATE" should be done on the group interface.
Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
Ilan Peer [Tue, 5 May 2015 09:36:56 +0000 (12:36 +0300)]
tests: Skip some tests in P2PS when a dedicated P2P Device is used
Some tests in test_p2ps.py test a scenario where a separate P2P
group interface is not used. However, this is not a valid case
when a dedicated P2P Device interface is used, as in such a case
a separate group interface must be used.
Handle this by skipping such tests in case a dedicated P2P Device is
used.
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Ilan Peer [Tue, 5 May 2015 09:36:55 +0000 (12:36 +0300)]
tests: Fix test_p2ps.py to save group results
Call group_form_result() whenever a new group is started, so that
group_ifname gets updated and later, the group can be removed when
needed.
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Ben Rosenfeld [Tue, 5 May 2015 09:36:54 +0000 (12:36 +0300)]
tests: Remove all P2P networks in call to reset
When resetting a device, remove all the P2P networks to prevent
unexpected behavior in following tests. This is needed for the case
where P2P Device interface is used.
Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
Ben Rosenfeld [Tue, 5 May 2015 09:36:52 +0000 (12:36 +0300)]
tests: Change test_p2p_messages to use global interface
This is required for cases where P2P Device is used and the event
happens on the global interface.
Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
Ben Rosenfeld [Tue, 5 May 2015 09:36:51 +0000 (12:36 +0300)]
tests: Change set_country() to use the global interface to get event
This is required for cases that multiple interfaces are used and the
event can happen on any of them, for example when a dedicated P2P Device
interface is used.
Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
Ben Rosenfeld [Tue, 5 May 2015 09:36:50 +0000 (12:36 +0300)]
tests: Change p2p_set_ssid_postfix to use the group interface for SSID
This is required for cases where thea P2P Device interface is used.
Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
Ben Rosenfeld [Tue, 5 May 2015 09:36:49 +0000 (12:36 +0300)]
tests: Fix test_ap_pmf to use own_addr
The tests used p2p_dev_addr that can be different from own_addr,
if a dedicated P2P Device interface is used.
Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
Ilan Peer [Mon, 4 May 2015 12:50:46 +0000 (15:50 +0300)]
P2P: Fix association with an AP/P2P GO that is not a P2P manager
Do not add a P2P IE when a station interface is trying to associate
to an AP or P2P GO that publishes a P2P IE but does not include
a P2P manageability attribute.
This addresses an interoperability issue that was reported in
https://bugzilla.kernel.org/show_bug.cgi?id=96471, where a P2P GO
rejects association from a station interface without a specified
reason.
Signed-off-by: Ilan Peer <ilan.peer@intel.com>