Commit Graph

11058 Commits (82b9ec3125d628fdf1773b1d1184fbc1579dc3c8)
 

Author SHA1 Message Date
Nishant Chaprana 82b9ec3125 D-Bus: Add DeviceFoundProperties signal for discovered peers
This signal sends the peer properties to applications for discovered
peers. The signature of this event is "oa{sv}". This event is needed
because the current DeviceFound signal provides only the peer object
path. If there are many peers in range there will be many DeviceFound
signals and for each DeviceFound signal, applications would need to use
GetAll to fetch peer properties. Doing this many times would create
extra load over application as well as over wpa_supplicant, so it is
better to send peer properties in the event so that applications can
extract found peer information without extra steps.

The existing DeviceFound signal is left as-is to avoid changing its
signature.

The issue is not applicable to the control interface because the
P2P-DEVICE-FOUND event includes peer info in it, but over D-Bus
interface DeviceFound provides only the peer object.

Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
8 years ago
Jouni Malinen e18d170848 tests: wpa_state == COMPLETED in mesh
Signed-off-by: Jouni Malinen <j@w1.fi>
8 years ago
Maital Hahn 4976618c76 mesh: Mark wpa_state COMPLETED when mesh join has been performed
In mesh interface, the wpa_supplicant state was either
DISCONNECT/SCANNING in non-secured connection or AUTHENTICATING in
secured connection. The latter prevented the scan. Update the
wpa_supplicant state in mesh to be COMPLETED upon initialization. This
is similar to the P2P GO case.

Signed-off-by: Maital Hahn <maitalm@ti.com>
8 years ago
Jouni Malinen d1bc3ec85e tests: wpa_supplicant AP mode - WPS operations with fragmentation
Signed-off-by: Jouni Malinen <j@w1.fi>
8 years ago
Lior David b94fff1d93 wpa_supplicant: Configurable EAP fragment size in AP mode
In wpa_supplicant AP mode, allow configuration of the EAP fragment size
using the fragment_size member of network block (wpa_ssid), similar to
the fragment_size in hostapd configuration. bss->fragment_size default
value of 0 is treated specially in some EAP code paths (such as MTU
initialization in eap_pwd_init). In order to preserve the existing
behavior, bss->fragment_size will only be set if the network block
specified a value different from the default which is
DEFAULT_FRAGMENT_SIZE(1398) bytes.

Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
8 years ago
Jouni Malinen 617593c37f Assign vendor specific elements for early HE testing
These elements can be used for pre-standard publication testing of HE
before P802.11ax draft assigns the element ID. The payload of these
vendor specific elements is defined by the latest P802.11ax draft.
Please note that the draft is still work in progress and the element
payload is subject to change.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years ago
Jouni Malinen 4874b78290 PAE: Use big endian version in current_peer_id.mn to be more consistent
This gets rid of sparse warnings related to mismatching annotation and
byte swapping.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years ago
Jouni Malinen ce256b4a49 PAE: Use sci->port more consistently
This is now annotated as be16, so use it as such in all cases instead of
first storing host byte order value and then swapping that to big endian
in other instances of the same structure. This gets rid of number of
sparse warnings.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years ago
Jouni Malinen 2f13e54dfc wired: Silence sparse warning on redefinition of IFNAMSIZ
driver_wired.c pulls in utils/common.h before net/if.h as a workaround
for NetBSD build. This results in IFNAMSIZ getting redefined and sparse
warning about this. Silence that warning by undefining the IFNAMSIZ
definition from common.h to allow the one from net/if.h being used. In
addition, remove duplicated inclusion of net/if.h.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years ago
Jouni Malinen 82ffcba755 Move extern declarations for ext_password backends into a header file
This gets rid of a sparse warning and also allows the compatibility of
the declarations to be verified (a missing const declaration is fixed
here as well).

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years ago
Jouni Malinen affdd33591 Move extern declarations for autoscan modules into a header file
This gets rid of number of sparse warnings and also allows the
compatibility of the declarations to be verified.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years ago
Jouni Malinen 9eece21357 Move extern declarations for bgscan modules into a header file
This gets rid of number of sparse warnings and also allows the
compatibility of the declarations to be verified.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years ago
Jouni Malinen 39ab6a5de2 Move extern declarations for driver ops into a header file
This gets rid of number of sparse warnings and also allows the
compatibility of the declarations to be verified (number of missing
const declarations are fixed here as well).

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years ago
Jouni Malinen 4775471816 nl80211: Mark wpa_driver_nl80211_get_macaddr() static
This function is not used outside this file.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years ago
Jouni Malinen ebae413550 Fix a debug print in p2p_manager_disconnect()
fc2str() expects to get the 16-bit frame control value in host byte
order.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years ago
Jouni Malinen f367c08dd5 Mark internal functions static
These functions are not called outside this file.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years ago
Jouni Malinen 582121b038 OpenSSL: Silence sparse warnings in fips186_2_prf()
Use WPA_PUT_BE32() instead of inplace conversion with host_to_be32() to
avoid sparse warnings.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years ago
Jouni Malinen 451e094c7e dhcp_snoop: Silence a sparse warning
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years ago
Jouni Malinen bbae0f03aa ndisc_snoop: Include ndisc_snoop.h to check prototypes
This allows the compiler to check that function prototypes match the
implementation. In addition, this gets rid of sparse warnings.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years ago
Jouni Malinen 99a716ac91 TNCS: Mark functions static
These are called through function pointers, so no need to make the
function symbols directly available outside this file.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years ago
Jouni Malinen 799a7ed8a9 PAE: Mark ieee802_1x_kay_deinit_data_key() static
This function is not used outside this file.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years ago
Jouni Malinen 4e7f5a4a2a PAE: Use be16/be32 instead of u16/u32 for spartse
This converts some of the PAE code to use a design that gets rid
unnecessary warnings from sparse and allows more thorough validation of
byte order operations.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years ago
Jouni Malinen ac36b133aa TNCC: Mark functions static
These are called through function pointers, so no need to make the
function symbols directly available outside this file.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years ago
Jouni Malinen 50a17a76e1 tests: Declare module test functions in a header file
This gets rid of number of warnings from sparse.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years ago
Jouni Malinen 3e624369cb tests: Mark some module test arrays static
These are not used outside the source code file.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years ago
Jouni Malinen fad6485c56 radiotap: Silence sparse warnings about byte order swapping
These little endian fields were not marked properly and the type case in
the get_unaligned_* helper macros were causing warnings from sparse.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years ago
Jouni Malinen 94c4d78ef1 FST: Make fst_action_names static
This is not used outside this file.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years ago
Jouni Malinen 82c734c28c FST: Fix byte order of couple of fields on big endian hosts
Couple of fsts_id and llt fields were not properly swapped from host
byte order to little endian byte order used in the frames. Fix this and
use the le32 type to make this more consistent and verifiable with
sparse.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years ago
Jouni Malinen 0dbe22be3d Mark wpas_data_test_rx() static
This is not called from outside ctrl_iface.c.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years ago
Jouni Malinen 4d8d710f0b Fix byte order for CONFIG_VHT_OVERRIDES parameters
The VHT parameters were not swapped properly on big endian systems.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years ago
Jouni Malinen 3787c91da0 OpenSSL: Pull in header files to check function prototypes
Since crypto_openssl.c is now implementing couple of functions
internally, pull in the relevant header files md5.h and aes_wrap.h to
make sure the function declaration are consistent.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years ago
Jouni Malinen 39cdd3a0f9 FST: Mark wpa_supplicant callback functions get_peer_{first,next} static
These are used only through function pointers, so no need to keep the
functions non-static.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years ago
Jouni Malinen 6013bbe04f TDLS: Declare tdls_testing as extern in a header file
This gets rid of a sparse warning with CONFIG_TDLS_TESTING builds.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years ago
Jouni Malinen 0e672b89e7 trace: Define externs in a header file
This gets rid of some unnecessary strace warnings from test builds.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years ago
Jouni Malinen 6527b52ead Undefine __bitwise before defining it for sparse
This gets rid of a compiler warning due to a bit different construction
in linux/types.h.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years ago
Jouni Malinen 468b7b12a6 Fix hostapd_sta_add() call to use NULL as the pointer instead of 0
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years ago
Jouni Malinen 0558bec1fd MBO: Mark verify_channel() static
This function is not used outside mbo.c.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years ago
Jouni Malinen 9e080bf343 WNM: Use NULL instead of 0 as the pointer return value
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
8 years ago
Jonathan Afek f885b8e97c tests: ap_ciphers tests start using general cmd_execute() function
The ap_ciphers tests used to do file operations locally in python. Start
using the cmd_execute() general function for file operations so that
this would also work on remote setups.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
8 years ago
Jonathan Afek 7fd9fbc27d tests: Add functions to execute shell commands on interface host
Add the feature to execute shell commands on each wpa_supplicant/hostapd
interface host. When executing remote tests the interfaces are not all
on a single host so when executing shell commands the test needs to
execute the command on the host which the interface relevant for the
command is on. This patch enables tests to execute the command on the
relevant host.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
8 years ago
Jonathan Afek 3b208346ec ctrl_iface: BSS command to skip info items if parsing fails
In some cases parsing of the mesh scan info for a BSS or the P2P scan
info can fail. One reason can be that the Beacon/Probe Response frame
contained malformed length vendor IEs which are not parsed when adding
to the BSS table. Instead of skipping the whole BSS of the BSS command,
just skip the part that failed to parse.

Signed-off-by: Jonathan Afek <jonathanx.afek@intel.com>
8 years ago
Jouni Malinen 51435515fb tests: mesh_scan_oom to support partial BSS result reporting
The next commit modifies the BSS command behavior to report partial
results for a BSS, so mesh_scan_oom needs to allow a BSS entry to be
returned as long as it does not include the mesh information.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years ago
Jouni Malinen 2833743d4c tests: WPA2-Enterprise connection using EAP-GPSK and wildcard SSID
Signed-off-by: Jouni Malinen <j@w1.fi>
8 years ago
Cedric Izoard a9c52e8066 HS 2.0R2: No longer use HTTP_RAW_POST_DATA
As HTTP_RAW_POST_DATA is deprecated, use php://input instead.

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
8 years ago
Cedric Izoard 04c18fa04b curl: Don't free memory for subjectAltName before calling callback
Freeing memory for subjectAltName in parse_cert(), will give cert_cb
pointers to freed memory zone that may already been overwritten. Memory
for subjectAltName is released in parse_cert_free().

Signed-off-by: Cedric Izoard <cedric.izoard@ceva-dsp.com>
8 years ago
Jouni Malinen 1f7cd73ca6 tests: More wpa_supplicant AP mode coverage
Signed-off-by: Jouni Malinen <j@w1.fi>
8 years ago
Jouni Malinen 94e8fe90c2 tests: Mesh with various pairwise and group ciphers
Signed-off-by: Jouni Malinen <j@w1.fi>
8 years ago
Masashi Honma 5a8e48fdb3 mesh: Use MESH_CAP_* macros for mesh capability
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
8 years ago
Masashi Honma d70a8ab1e3 mesh: Ignore crowded peer
The "Accepting Additional Mesh Peerings bit == 0" means the peer cannot
accept any more peers, so suppress attempt to open a connection to such
a peer.

Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
8 years ago
Jouni Malinen a151b0e37d mesh: Select pairwise and group cipher based on network profile
This allows the previously hardcoded CCMP cipher to be replaced in the
network profile for mesh.

Signed-off-by: Jouni Malinen <j@w1.fi>
8 years ago