aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update AP IE regardless WPA_DRIVER_FLAGS_BSS_SELECTION flagandroid-mDmitry Shmidt2016-04-021-0/+4
| | | | | | | | | Change-Id: Ia2b0aea81e250cfd989861ed37551ca8c41f7a66 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> (cherry picked from commit 18306c6ac9281cca7d986a0d780047df0f32675f) Conflicts: wpa_supplicant/events.c
* AOSP: Android: Add src directory symlinksDmitry Shmidt2016-04-022-0/+2
| | | | | | | | | These are from Android wpa_supplicant_8.git initial 0.8.X commit 8d520ff1dc2da35cdca849e982051b86468016d8. Change-Id: I26aec5afbbd4f4a1f5fd900912545b6f5050de64 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> (cherry picked from commit 05d4c3aec6024ed308d640d68f91ab4e926fd79d)
* AOSP: Add CleanSpec.mkJouni Malinen2016-04-021-0/+64
| | | | | This is a snapshot from AOSP commit 0a67fb8a30fa69ee3b158f981bb1f6865bfbdef5.
* AOSP: Android: Add MODULE_LICENSE_BSD_LIKEDmitry Shmidt2016-04-021-0/+0
| | | | | | | | | These are from Android wpa_supplicant_8.git initial 0.8.X commit 8d520ff1dc2da35cdca849e982051b86468016d8. Change-Id: I26aec5afbbd4f4a1f5fd900912545b6f5050de64 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com> (cherry picked from commit a6df7575b64ef902ae27d17769a3cf7e6056a975)
* Android: Fix max number of sched scan SSIDs based on driver capabilityDmitry Shmidt2016-04-021-3/+11
| | | | | | | | This adds use of the driver capability (instead of hardcoded WPAS_MAX_SCAN_SSIDS) in wpas_start_pno() similarly to what was already done in wpa_supplicant_req_sched_scan(). Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
* binder: Implement interface add/remove methodsRoshan Pius2016-04-028-0/+262
| | | | | | | | | | | | | This commit implements the methods defined in Supplicant service: 1. CreateInterface 2. RemoveInterface 3. GetInterface The binder service returns the corresponding iface binder object references which can be used by clients to control a specific interface. Signed-off-by: Roshan Pius <rpius@google.com>
* binder: Add binder skeletal code for AndroidRoshan Pius2016-04-0216-0/+458
| | | | | | | | | | | | | | | | | | | | | | | | Create the skeletal binder interface for wpa_supplicant. The interface hierarchy is based off the existing dbus interface(https://w1.fi/wpa_supplicant/devel/dbus.html). Since we use libbinder, the binder interface codebase needs to be written in C++ and can only be compiled on Android platform for now. The aidl files define binder RPC interfaces. The Android build system generates the corresponding C++ interface classes which needs to be implemented by the server process. The clients can obtain a reference to the binder service (root object) using: android::String16 service_name("fi.w1.wpa_supplicant"); android::sp<android::IBinder> binder = android::defaultServiceManager()->getService(service_name); Once a reference to the root object is retrieved, the clients can obtain references to other RPC objects using that root object methods. Signed-off-by: Roshan Pius <rpius@google.com>
* Remove struct ieee80211_mgmt::u.probe_reqJouni Malinen2016-04-021-4/+1
| | | | | | | | | | | This struct in the union is empty, but the design of using a zero-length u8 array here is not fully compatible with C++ and can result in undesired compiler warnings. This struct is not used anymore, so it can be removed from the struct ieee80211_mgmt definition to complete the changes started in commit d447cd596f0a9f73850229e7fa2bdd35755dc750 ('Updates for stricter automatic memcpy bounds checking'). Signed-off-by: Jouni Malinen <j@w1.fi>
* atheros: Do not use struct ieee80211_mgmt::u.probe_reqJouni Malinen2016-04-021-4/+3
| | | | | | | | | | This struct in the union is empty, but the design of using a zero-length u8 array here is not fully compatible with C++ and can result in undesired compiler warnings. Since there are no non-IE fields in the Probe Request frames, get the location of the variable length IEs simply by using the pointer to the frame header and the known header length. Signed-off-by: Jouni Malinen <j@w1.fi>
* wpa_supplicant: Do not use struct ieee80211_mgmt::u.probe_reqJouni Malinen2016-04-021-10/+13
| | | | | | | | | | This struct in the union is empty, but the design of using a zero-length u8 array here is not fully compatible with C++ and can result in undesired compiler warnings. Since there are no non-IE fields in the Probe Request frames, get the location of the variable length IEs simply by using the pointer to the frame header and the known header length. Signed-off-by: Jouni Malinen <j@w1.fi>
* AP: Do not use struct ieee80211_mgmt::u.probe_reqJouni Malinen2016-04-021-3/+3
| | | | | | | | | | This struct in the union is empty, but the design of using a zero-length u8 array here is not fully compatible with C++ and can result in undesired compiler warnings. Since there are no non-IE fields in the Probe Request frames, get the location of the variable length IEs simply by using the pointer to the frame header and the known header length. Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: EAP-SIM fast reauth with no-change SET_NETWORKJouni Malinen2016-03-311-0/+45
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Do not clear PMKSA entry or EAP session cache if config does not changeBala Krishna Bhamidipati2016-03-312-7/+82
| | | | | | | | | | | | | | | | | | | This avoids unnecessary flushing of the PMKSA cache entry and EAP session data when processing SET_NETWORK commands that set a network profile parameter to the same value that the parameter already has. Introduce a new wpa_config_set() and wpa_config_set_quoted() return value (==1) signifying that the new value being set for the corresponding field equals to the already configured one so that the caller can determine that nothing changed in the profile. For now, this does not cover all the network profile parameters, but number of the most commonly used parameters are included to cover the Android use cases where the framework may have issued SET_NETWORK commands that would have unnecessarily prevented use of PMKSA caching or EAP fast reauthentication. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Revert "Assign QCA vendor command and attribute for Tx/Rx aggregation"Sunil Dutt2016-03-311-19/+0
| | | | | | | | | | | This reverts commit 4ca16b5fd71833d7d200167ba10b471cab7d049f. Configuration for this will be done using a previously assigned more generic command. This new command QCA_NL80211_VENDOR_SUBCMD_SET_TXRX_AGGREGATION has not been used in any driver version and won't be used, so the assigned command id can be freed for future use. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* tests: SAE and bignum failuresJouni Malinen2016-03-271-1/+87
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Add TEST_FAIL() calls into OpenSSL bignum operationsJouni Malinen2016-03-271-1/+46
| | | | | | This makes it easier to test error paths in bignum operations in SAE. Signed-off-by: Jouni Malinen <j@w1.fi>
* Comment out UDP/UNIX socket code from common ctrl_iface based on buildJouni Malinen2016-03-271-8/+29
| | | | | | | These were unreachable cases in the switch statements based on how the build was configured. Signed-off-by: Jouni Malinen <j@w1.fi>
* Fix CONFIG_CTRL_IFACE=udp6/udp6-remote buildsJouni Malinen2016-03-271-1/+7
| | | | | | | | | wpa_supplicant_global_ctrl_iface_receive() did not handle the from address properly for the IPv6 case. This was broken by commit d60886cdafbf839be05ca5f7d4877565d4958a44 ('wpa_supplicant: Add monitor support for global UDP ctrl_iface'). Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: SAE and pwe failureJouni Malinen2016-03-271-1/+36
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* SAE: Check SHA256-PRF operation resultJouni Malinen2016-03-273-23/+34
| | | | | | | While this is mostly theoretical, check explicitly that SHA256 operations in sha256_prf*() succeed. Signed-off-by: Jouni Malinen <j@w1.fi>
* SAE: Remove dead code in FFC pwd-value derivationJouni Malinen2016-03-271-2/+0
| | | | | | | The local bits variable is set to prime_len * 8 and consequently bits % 8 cannot be anything else than 0. Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: RADIUS accounting with various security casesJouni Malinen2016-03-271-1/+53
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Suite B error cases for PMKID and MIC derivationJouni Malinen2016-03-271-9/+89
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: WNM BSS transition management with various PHY typesJouni Malinen2016-03-271-4/+34
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: DFS CAC functionality on channel 104 HT40-Jouni Malinen2016-03-272-1/+41
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: AP Channel Switch - invalid channelJouni Malinen2016-03-261-1/+11
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Information element parsing OOMJouni Malinen2016-03-261-0/+13
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Information element parsing - extra coverageJouni Malinen2016-03-261-0/+12
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: QCA vendor element parsingJouni Malinen2016-03-261-1/+1
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Invalid VHT 80 and 80+80 MHz configuration (seg0/seg1)Jouni Malinen2016-03-261-0/+92
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: HT40 co-ex scan and broken legacy/HT APJouni Malinen2016-03-261-0/+46
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: HT40 on 5 GHz with disabled secondary channelJouni Malinen2016-03-261-0/+20
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: Fix FST cleanup if alloc_fail is not supportedJouni Malinen2016-03-261-4/+13
| | | | | | | | | | | | | The test cases fst_ap_start_session_oom and fst_setup_mbie_diff did not clean up FST sessions properly in case alloc_fail failed due to missing support for it in the build. This could result in abandoning attached hostapd global control interface monitors and test case failures due to the global control interface socket running out of output buffer. Fix this by going through the cleanup steps even if alloc_fail raises HwsimSkip exception. Signed-off-by: Jouni Malinen <j@w1.fi>
* nl80211: Fix libnl-tiny build with CONFIG_LIBNL20=yJouni Malinen2016-03-262-2/+6
| | | | | | libnl-tiny does not use the separate nl-genl library. Signed-off-by: Jouni Malinen <j@w1.fi>
* Use TIOCOUTQ instead of SIOCOUTQ to avoid need for linux/sockios.hJouni Malinen2016-03-261-3/+2
| | | | | | | | All that the kernel header was doing here is defining SIOCOUTQ to be TIOCOUTQ. Instead of pulling in the header, we might as well use TIOCOUTQ directly. Signed-off-by: Jouni Malinen <j@w1.fi>
* wlantest: Use local ETH_P_IP define instead of linux/if_ether.hJouni Malinen2016-03-262-1/+3
| | | | | | | | There is no strong need for pulling in linux/if_ether.h here since all that is needed if ETH_P_IP and we already cover multiple other ETH_P_* values in utils/common.h. Signed-off-by: Jouni Malinen <j@w1.fi>
* Drop USE_KERNEL_HEADERS defineJouni Malinen2016-03-262-8/+0
| | | | | | | | | | This was only used for providing an option to use linux/if_packet.h instgead of netpacket/packet.h in src/ap/iapp.c. However, netpacket/packet.h is nowadays commonly available and hostapd already depends on it through src/l2_packet/l2_packet_linux.c, so there is no need to continue to provide this option for the kernel header. Signed-off-by: Jouni Malinen <j@w1.fi>
* Use a separate header file for Linux bridge interface definitionsJouni Malinen2016-03-262-10/+25
| | | | | | | This moves the BRCTL_* defines from vlan_full.c to linux_bridge.h to clean up header inclusion. Signed-off-by: Jouni Malinen <j@w1.fi>
* Use own header file for defining Linux VLAN kernel interfaceJouni Malinen2016-03-263-12/+56
| | | | | | | | This gets rid of need to include linux/if_vlan.h and additional defines in vlan_ioctl.c to avoid issues with missing definitions in libc headers. Signed-off-by: Jouni Malinen <j@w1.fi>
* vlan: Fix musl libc conflict with Linux kernel headersJörg Krause2016-03-261-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | Due to both <netinet/in.h> (in "utils/includes.h") and <linux/in6.h> (in <linux/if_bridge.h>) being included, the in6_addr is being redefined: once from the C library headers and once from the Linux kernel headers. This causes some build failures with for example the musl C library: In file included from /usr/include/linux/if_bridge.h:18, from ../src/ap/vlan_init.c:17: /usr/include/linux/in6.h:32: error: redefinition of 'struct in6_addr' /usr/include/linux/in6.h:49: error: redefinition of 'struct sockaddr_in6' /usr/include/linux/in6.h:59: error: redefinition of 'struct ipv6_mreq' Mixing C library and Linux kernel headers is a bit problematic [1] and should be avoided if possible [2]. In order to fix this, define just the macros needed from <linux/if_bridge.h> as done in Busybox for the brctl applet [3]. [1] https://sourceware.org/bugzilla/show_bug.cgi?id=15850 [2] http://www.openwall.com/lists/musl/2015/10/06/1 [3] https://git.busybox.net/busybox/commit/?id=5fa6d1a632505789409a2ba6cf8e112529f9db18 Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
* P2P: Fix persistent group for 60 GHz networksLior David2016-03-251-3/+6
| | | | | | | | | | | Fix two problems with storage of 60 GHz P2P persistent groups: 1. pbss flag was not stored in the network block. 2. When recreating the persistent group from storage, in addition to the missing pbss flag, the pairwise_cipher and group_cipher were initialized to CCMP which does not work in 60 GHz since the default in 60 GHz should be GCMP. Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
* vlan: Move if_nametoindex() use out of vlan_init.cJouni Malinen2016-03-253-4/+8
| | | | | | | | With this, vlan_init.c does not need any special header files anymore and vlan_ifconfig.c does not need hostapd-specific header files that might conflict with net/if.h on NetBSD. Signed-off-by: Jouni Malinen <j@w1.fi>
* vlan: Move ifconfig helpers to a separate fileJouni Malinen2016-03-254-50/+68
| | | | | | This removes final ioctl() use within vlan_init.c. Signed-off-by: Jouni Malinen <j@w1.fi>
* vlan: Move CONFIG_FULL_DYNAMIC_VLAN functionality into a separate fileJouni Malinen2016-03-255-742/+768
| | | | | | | This cleans up vlan_init.c by removing number of C pre-processor dependencies. Signed-off-by: Jouni Malinen <j@w1.fi>
* vlan: Remove unnecessary header includes from netlink implementationJouni Malinen2016-03-251-8/+0
| | | | | | | The implementation in vlan_util.c does not use many of the header files that were pulled in. Signed-off-by: Jouni Malinen <j@w1.fi>
* vlan: Clean up netlink vs. ioctl API implementationJouni Malinen2016-03-256-172/+186
| | | | | | | | | | | Move the ioctl-based VLAN implementation to a separate file to avoid need for conditional blocks within vlan_ioctl.c. This removes the internal CONFIG_VLAN_NETLINK define, i.e., this is now used only in build configuration (.config) to select whether to include the vlan_util.c (netlink) or vlan_ioctl.c (ioctl) implementation of the functions. Signed-off-by: Jouni Malinen <j@w1.fi>
* vlan: Fix musl build errorJörg Krause2016-03-251-3/+3
| | | | | | | | | | | | | | | | caddr_t is legacy BSD and should be avoided [1]. While glibc may still use __caddr_t as the type, Linux kernel does not (it is "void __user * ifru_data"). This fixes compile errors with the musl libc: ../src/ap/vlan_init.c: In function 'br_delif': ../src/ap/vlan_init.c:218:18: error: '__caddr_t' undeclared (first use in this function) ifr.ifr_data = (__caddr_t) args; [1] http://stackoverflow.com/questions/6381526/what-is-the-significance-of-caddr-t-and-when-is-it-used Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
* Make it a bit easier to roam from 2.4 GHz to 5 GHz within ESSJouni Malinen2016-03-251-1/+12
| | | | | | | | | | The initial connection to an ESS was already explicitly increasing the likelihood of picking a 5 GHz BSS. While the throughput estimation is likely to do same for the roaming decision, it might be possible that that does not cover all cases. Add couple of dB extra preference for 5 GHz in case the roaming decision falls back to comparing signal levels. Signed-off-by: Jouni Malinen <j@w1.fi>
* Fix a typo in a commentJouni Malinen2016-03-251-1/+1
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* tests: WNM BSS Transition Management and cfg80211 connect commandJouni Malinen2016-03-251-0/+53
| | | | | | | | For now, this is not enforcing cfg80211 reassociation since the needed changes do not yet exist in the upstream kernel. Once those changes are accepted, the TODO note in the test case can be addressed. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>