|
|
@@ -14,7 +14,7 @@
|
|
|
CFLAGS += -O0 -fprofile-arcs -ftest-coverage
|
|
|
--- a/src/ap/hostapd.h
|
|
|
+++ b/src/ap/hostapd.h
|
|
|
-@@ -17,6 +17,7 @@
|
|
|
+@@ -18,6 +18,7 @@
|
|
|
#include "utils/list.h"
|
|
|
#include "ap_config.h"
|
|
|
#include "drivers/driver.h"
|
|
|
@@ -22,7 +22,7 @@
|
|
|
|
|
|
#define OCE_STA_CFON_ENABLED(hapd) \
|
|
|
((hapd->conf->oce & OCE_STA_CFON) && \
|
|
|
-@@ -80,7 +81,7 @@ struct hapd_interfaces {
|
|
|
+@@ -92,7 +93,7 @@ struct hapd_interfaces {
|
|
|
#ifdef CONFIG_CTRL_IFACE_UDP
|
|
|
unsigned char ctrl_iface_cookie[CTRL_IFACE_COOKIE_LEN];
|
|
|
#endif /* CONFIG_CTRL_IFACE_UDP */
|
|
|
@@ -31,7 +31,7 @@
|
|
|
};
|
|
|
|
|
|
enum hostapd_chan_status {
|
|
|
-@@ -171,6 +172,7 @@ struct hostapd_data {
|
|
|
+@@ -183,6 +184,7 @@ struct hostapd_data {
|
|
|
struct hostapd_iface *iface;
|
|
|
struct hostapd_config *iconf;
|
|
|
struct hostapd_bss_config *conf;
|
|
|
@@ -39,7 +39,7 @@
|
|
|
int interface_added; /* virtual interface added for this BSS */
|
|
|
unsigned int started:1;
|
|
|
unsigned int disabled:1;
|
|
|
-@@ -630,6 +632,7 @@ hostapd_alloc_bss_data(struct hostapd_if
|
|
|
+@@ -673,6 +675,7 @@ hostapd_alloc_bss_data(struct hostapd_if
|
|
|
struct hostapd_bss_config *bss);
|
|
|
int hostapd_setup_interface(struct hostapd_iface *iface);
|
|
|
int hostapd_setup_interface_complete(struct hostapd_iface *iface, int err);
|
|
|
@@ -49,7 +49,7 @@
|
|
|
struct hostapd_iface * hostapd_alloc_iface(void);
|
|
|
--- a/src/ap/hostapd.c
|
|
|
+++ b/src/ap/hostapd.c
|
|
|
-@@ -396,6 +396,7 @@ void hostapd_free_hapd_data(struct hosta
|
|
|
+@@ -401,6 +401,7 @@ void hostapd_free_hapd_data(struct hosta
|
|
|
hapd->beacon_set_done = 0;
|
|
|
|
|
|
wpa_printf(MSG_DEBUG, "%s(%s)", __func__, hapd->conf->iface);
|
|
|
@@ -57,7 +57,7 @@
|
|
|
accounting_deinit(hapd);
|
|
|
hostapd_deinit_wpa(hapd);
|
|
|
vlan_deinit(hapd);
|
|
|
-@@ -1422,6 +1423,8 @@ static int hostapd_setup_bss(struct host
|
|
|
+@@ -1431,6 +1432,8 @@ static int hostapd_setup_bss(struct host
|
|
|
if (hapd->driver && hapd->driver->set_operstate)
|
|
|
hapd->driver->set_operstate(hapd->drv_priv, 1);
|
|
|
|
|
|
@@ -66,7 +66,7 @@
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-@@ -2028,6 +2031,7 @@ static int hostapd_setup_interface_compl
|
|
|
+@@ -2050,6 +2053,7 @@ static int hostapd_setup_interface_compl
|
|
|
if (err)
|
|
|
goto fail;
|
|
|
|
|
|
@@ -74,7 +74,7 @@
|
|
|
wpa_printf(MSG_DEBUG, "Completing interface initialization");
|
|
|
if (iface->freq) {
|
|
|
#ifdef NEED_AP_MLME
|
|
|
-@@ -2225,6 +2229,7 @@ dfs_offload:
|
|
|
+@@ -2248,6 +2252,7 @@ dfs_offload:
|
|
|
|
|
|
fail:
|
|
|
wpa_printf(MSG_ERROR, "Interface initialization failed");
|
|
|
@@ -82,7 +82,7 @@
|
|
|
hostapd_set_state(iface, HAPD_IFACE_DISABLED);
|
|
|
wpa_msg(hapd->msg_ctx, MSG_INFO, AP_EVENT_DISABLED);
|
|
|
#ifdef CONFIG_FST
|
|
|
-@@ -2700,6 +2705,7 @@ void hostapd_interface_deinit_free(struc
|
|
|
+@@ -2723,6 +2728,7 @@ void hostapd_interface_deinit_free(struc
|
|
|
(unsigned int) iface->conf->num_bss);
|
|
|
driver = iface->bss[0]->driver;
|
|
|
drv_priv = iface->bss[0]->drv_priv;
|
|
|
@@ -92,7 +92,7 @@
|
|
|
__func__, driver, drv_priv);
|
|
|
--- a/src/ap/ieee802_11.c
|
|
|
+++ b/src/ap/ieee802_11.c
|
|
|
-@@ -3553,13 +3553,18 @@ static void handle_auth(struct hostapd_d
|
|
|
+@@ -3573,13 +3573,18 @@ static void handle_auth(struct hostapd_d
|
|
|
u16 auth_alg, auth_transaction, status_code;
|
|
|
u16 resp = WLAN_STATUS_SUCCESS;
|
|
|
struct sta_info *sta = NULL;
|
|
|
@@ -112,7 +112,7 @@
|
|
|
|
|
|
if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.auth)) {
|
|
|
wpa_printf(MSG_INFO, "handle_auth - too short payload (len=%lu)",
|
|
|
-@@ -3727,6 +3732,13 @@ static void handle_auth(struct hostapd_d
|
|
|
+@@ -3747,6 +3752,13 @@ static void handle_auth(struct hostapd_d
|
|
|
resp = WLAN_STATUS_UNSPECIFIED_FAILURE;
|
|
|
goto fail;
|
|
|
}
|
|
|
@@ -126,7 +126,7 @@
|
|
|
if (res == HOSTAPD_ACL_PENDING)
|
|
|
return;
|
|
|
|
|
|
-@@ -5447,7 +5459,7 @@ static void handle_assoc(struct hostapd_
|
|
|
+@@ -5488,7 +5500,7 @@ static void handle_assoc(struct hostapd_
|
|
|
int resp = WLAN_STATUS_SUCCESS;
|
|
|
u16 reply_res = WLAN_STATUS_UNSPECIFIED_FAILURE;
|
|
|
const u8 *pos;
|
|
|
@@ -135,7 +135,7 @@
|
|
|
struct sta_info *sta;
|
|
|
u8 *tmp = NULL;
|
|
|
#ifdef CONFIG_FILS
|
|
|
-@@ -5660,6 +5672,11 @@ static void handle_assoc(struct hostapd_
|
|
|
+@@ -5701,6 +5713,11 @@ static void handle_assoc(struct hostapd_
|
|
|
left = res;
|
|
|
}
|
|
|
#endif /* CONFIG_FILS */
|
|
|
@@ -147,7 +147,7 @@
|
|
|
|
|
|
/* followed by SSID and Supported rates; and HT capabilities if 802.11n
|
|
|
* is used */
|
|
|
-@@ -5758,6 +5775,13 @@ static void handle_assoc(struct hostapd_
|
|
|
+@@ -5799,6 +5816,13 @@ static void handle_assoc(struct hostapd_
|
|
|
}
|
|
|
#endif /* CONFIG_FILS */
|
|
|
|
|
|
@@ -161,7 +161,7 @@
|
|
|
fail:
|
|
|
|
|
|
/*
|
|
|
-@@ -5851,6 +5875,7 @@ static void handle_disassoc(struct hosta
|
|
|
+@@ -5892,6 +5916,7 @@ static void handle_disassoc(struct hosta
|
|
|
wpa_printf(MSG_DEBUG, "disassocation: STA=" MACSTR " reason_code=%d",
|
|
|
MAC2STR(mgmt->sa),
|
|
|
le_to_host16(mgmt->u.disassoc.reason_code));
|
|
|
@@ -169,7 +169,7 @@
|
|
|
|
|
|
sta = ap_get_sta(hapd, mgmt->sa);
|
|
|
if (sta == NULL) {
|
|
|
-@@ -5920,6 +5945,8 @@ static void handle_deauth(struct hostapd
|
|
|
+@@ -5961,6 +5986,8 @@ static void handle_deauth(struct hostapd
|
|
|
/* Clear the PTKSA cache entries for PASN */
|
|
|
ptksa_cache_flush(hapd->ptksa, mgmt->sa, WPA_CIPHER_NONE);
|
|
|
|
|
|
@@ -180,7 +180,7 @@
|
|
|
wpa_msg(hapd->msg_ctx, MSG_DEBUG, "Station " MACSTR " trying "
|
|
|
--- a/src/ap/beacon.c
|
|
|
+++ b/src/ap/beacon.c
|
|
|
-@@ -852,6 +852,12 @@ void handle_probe_req(struct hostapd_dat
|
|
|
+@@ -919,6 +919,12 @@ void handle_probe_req(struct hostapd_dat
|
|
|
u16 csa_offs[2];
|
|
|
size_t csa_offs_len;
|
|
|
struct radius_sta rad_info;
|
|
|
@@ -193,7 +193,7 @@
|
|
|
|
|
|
if (hapd->iconf->rssi_ignore_probe_request && ssi_signal &&
|
|
|
ssi_signal < hapd->iconf->rssi_ignore_probe_request)
|
|
|
-@@ -1038,6 +1044,12 @@ void handle_probe_req(struct hostapd_dat
|
|
|
+@@ -1105,6 +1111,12 @@ void handle_probe_req(struct hostapd_dat
|
|
|
}
|
|
|
#endif /* CONFIG_P2P */
|
|
|
|
|
|
@@ -234,7 +234,7 @@
|
|
|
wpabuf_free(sta->p2p_ie);
|
|
|
--- a/src/ap/sta_info.c
|
|
|
+++ b/src/ap/sta_info.c
|
|
|
-@@ -458,6 +458,7 @@ void ap_handle_timer(void *eloop_ctx, vo
|
|
|
+@@ -460,6 +460,7 @@ void ap_handle_timer(void *eloop_ctx, vo
|
|
|
hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
|
|
|
HOSTAPD_LEVEL_INFO, "deauthenticated due to "
|
|
|
"local deauth request");
|
|
|
@@ -242,7 +242,7 @@
|
|
|
ap_free_sta(hapd, sta);
|
|
|
return;
|
|
|
}
|
|
|
-@@ -613,6 +614,7 @@ skip_poll:
|
|
|
+@@ -615,6 +616,7 @@ skip_poll:
|
|
|
mlme_deauthenticate_indication(
|
|
|
hapd, sta,
|
|
|
WLAN_REASON_PREV_AUTH_NOT_VALID);
|
|
|
@@ -260,7 +260,7 @@
|
|
|
hapd->msg_ctx_parent != hapd->msg_ctx)
|
|
|
--- a/src/ap/wpa_auth_glue.c
|
|
|
+++ b/src/ap/wpa_auth_glue.c
|
|
|
-@@ -265,6 +265,7 @@ static void hostapd_wpa_auth_psk_failure
|
|
|
+@@ -268,6 +268,7 @@ static void hostapd_wpa_auth_psk_failure
|
|
|
struct hostapd_data *hapd = ctx;
|
|
|
wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_POSSIBLE_PSK_MISMATCH MACSTR,
|
|
|
MAC2STR(addr));
|
|
|
@@ -270,7 +270,7 @@
|
|
|
|
|
|
--- a/wpa_supplicant/Makefile
|
|
|
+++ b/wpa_supplicant/Makefile
|
|
|
-@@ -176,6 +176,12 @@ ifdef CONFIG_EAPOL_TEST
|
|
|
+@@ -183,6 +183,12 @@ ifdef CONFIG_EAPOL_TEST
|
|
|
CFLAGS += -Werror -DEAPOL_TEST
|
|
|
endif
|
|
|
|
|
|
@@ -283,7 +283,7 @@
|
|
|
ifdef CONFIG_CODE_COVERAGE
|
|
|
CFLAGS += -O0 -fprofile-arcs -ftest-coverage
|
|
|
LIBS += -lgcov
|
|
|
-@@ -962,6 +968,9 @@ ifdef CONFIG_CTRL_IFACE_MIB
|
|
|
+@@ -977,6 +983,9 @@ ifdef CONFIG_CTRL_IFACE_MIB
|
|
|
CFLAGS += -DCONFIG_CTRL_IFACE_MIB
|
|
|
endif
|
|
|
OBJS += ../src/ap/ctrl_iface_ap.o
|
|
|
@@ -295,7 +295,7 @@
|
|
|
CFLAGS += -DEAP_SERVER -DEAP_SERVER_IDENTITY
|
|
|
--- a/wpa_supplicant/wpa_supplicant.c
|
|
|
+++ b/wpa_supplicant/wpa_supplicant.c
|
|
|
-@@ -7241,6 +7241,8 @@ struct wpa_supplicant * wpa_supplicant_a
|
|
|
+@@ -7285,6 +7285,8 @@ struct wpa_supplicant * wpa_supplicant_a
|
|
|
}
|
|
|
#endif /* CONFIG_P2P */
|
|
|
|
|
|
@@ -304,7 +304,7 @@
|
|
|
return wpa_s;
|
|
|
}
|
|
|
|
|
|
-@@ -7267,6 +7269,8 @@ int wpa_supplicant_remove_iface(struct w
|
|
|
+@@ -7311,6 +7313,8 @@ int wpa_supplicant_remove_iface(struct w
|
|
|
struct wpa_supplicant *parent = wpa_s->parent;
|
|
|
#endif /* CONFIG_MESH */
|
|
|
|
|
|
@@ -313,7 +313,7 @@
|
|
|
/* Remove interface from the global list of interfaces */
|
|
|
prev = global->ifaces;
|
|
|
if (prev == wpa_s) {
|
|
|
-@@ -7570,8 +7574,12 @@ int wpa_supplicant_run(struct wpa_global
|
|
|
+@@ -7614,8 +7618,12 @@ int wpa_supplicant_run(struct wpa_global
|
|
|
eloop_register_signal_terminate(wpa_supplicant_terminate, global);
|
|
|
eloop_register_signal_reconfig(wpa_supplicant_reconfig, global);
|
|
|
|
|
|
@@ -328,7 +328,7 @@
|
|
|
|
|
|
--- a/wpa_supplicant/wpa_supplicant_i.h
|
|
|
+++ b/wpa_supplicant/wpa_supplicant_i.h
|
|
|
-@@ -19,6 +19,7 @@
|
|
|
+@@ -20,6 +20,7 @@
|
|
|
#include "wps/wps_defs.h"
|
|
|
#include "config_ssid.h"
|
|
|
#include "wmm_ac.h"
|
|
|
@@ -336,7 +336,7 @@
|
|
|
|
|
|
extern const char *const wpa_supplicant_version;
|
|
|
extern const char *const wpa_supplicant_license;
|
|
|
-@@ -322,6 +323,8 @@ struct wpa_global {
|
|
|
+@@ -323,6 +324,8 @@ struct wpa_global {
|
|
|
#endif /* CONFIG_WIFI_DISPLAY */
|
|
|
|
|
|
struct psk_list_entry *add_psk; /* From group formation */
|
|
|
@@ -345,7 +345,7 @@
|
|
|
};
|
|
|
|
|
|
|
|
|
-@@ -708,6 +711,7 @@ struct wpa_supplicant {
|
|
|
+@@ -707,6 +710,7 @@ struct wpa_supplicant {
|
|
|
unsigned char own_addr[ETH_ALEN];
|
|
|
unsigned char perm_addr[ETH_ALEN];
|
|
|
char ifname[100];
|
|
|
@@ -363,7 +363,7 @@
|
|
|
|
|
|
|
|
|
#ifndef WPS_PIN_SCAN_IGNORE_SEL_REG
|
|
|
-@@ -393,6 +394,8 @@ static int wpa_supplicant_wps_cred(void
|
|
|
+@@ -391,6 +392,8 @@ static int wpa_supplicant_wps_cred(void
|
|
|
wpa_hexdump_key(MSG_DEBUG, "WPS: Received Credential attribute",
|
|
|
cred->cred_attr, cred->cred_attr_len);
|
|
|
|
|
|
@@ -374,7 +374,7 @@
|
|
|
|
|
|
--- a/hostapd/main.c
|
|
|
+++ b/hostapd/main.c
|
|
|
-@@ -895,6 +895,7 @@ int main(int argc, char *argv[])
|
|
|
+@@ -897,6 +897,7 @@ int main(int argc, char *argv[])
|
|
|
}
|
|
|
|
|
|
hostapd_global_ctrl_iface_init(&interfaces);
|
|
|
@@ -382,7 +382,7 @@
|
|
|
|
|
|
if (hostapd_global_run(&interfaces, daemonize, pid_file)) {
|
|
|
wpa_printf(MSG_ERROR, "Failed to start eloop");
|
|
|
-@@ -904,6 +905,7 @@ int main(int argc, char *argv[])
|
|
|
+@@ -906,6 +907,7 @@ int main(int argc, char *argv[])
|
|
|
ret = 0;
|
|
|
|
|
|
out:
|
|
|
@@ -392,7 +392,7 @@
|
|
|
for (i = 0; i < interfaces.count; i++) {
|
|
|
--- a/wpa_supplicant/main.c
|
|
|
+++ b/wpa_supplicant/main.c
|
|
|
-@@ -203,7 +203,7 @@ int main(int argc, char *argv[])
|
|
|
+@@ -204,7 +204,7 @@ int main(int argc, char *argv[])
|
|
|
|
|
|
for (;;) {
|
|
|
c = getopt(argc, argv,
|
|
|
@@ -401,7 +401,7 @@
|
|
|
if (c < 0)
|
|
|
break;
|
|
|
switch (c) {
|
|
|
-@@ -271,6 +271,9 @@ int main(int argc, char *argv[])
|
|
|
+@@ -272,6 +272,9 @@ int main(int argc, char *argv[])
|
|
|
params.conf_p2p_dev = optarg;
|
|
|
break;
|
|
|
#endif /* CONFIG_P2P */
|
|
|
@@ -473,7 +473,7 @@
|
|
|
|
|
|
--- a/src/ap/dfs.c
|
|
|
+++ b/src/ap/dfs.c
|
|
|
-@@ -1196,6 +1196,8 @@ int hostapd_dfs_radar_detected(struct ho
|
|
|
+@@ -1203,6 +1203,8 @@ int hostapd_dfs_pre_cac_expired(struct h
|
|
|
"freq=%d ht_enabled=%d chan_offset=%d chan_width=%d cf1=%d cf2=%d",
|
|
|
freq, ht_enabled, chan_offset, chan_width, cf1, cf2);
|
|
|
|
|
|
@@ -515,7 +515,7 @@
|
|
|
}
|
|
|
--- a/src/ap/sta_info.h
|
|
|
+++ b/src/ap/sta_info.h
|
|
|
-@@ -324,6 +324,7 @@ struct sta_info {
|
|
|
+@@ -328,6 +328,7 @@ struct sta_info {
|
|
|
#endif /* CONFIG_TESTING_OPTIONS */
|
|
|
#ifdef CONFIG_AIRTIME_POLICY
|
|
|
unsigned int airtime_weight;
|
|
|
@@ -525,9 +525,9 @@
|
|
|
|
|
|
--- a/src/ap/wnm_ap.c
|
|
|
+++ b/src/ap/wnm_ap.c
|
|
|
-@@ -442,7 +442,8 @@ static void ieee802_11_rx_bss_trans_mgmt
|
|
|
- wpa_hexdump(MSG_DEBUG, "WNM: BSS Transition Candidate List Entries",
|
|
|
- pos, end - pos);
|
|
|
+@@ -455,7 +455,8 @@ static void ieee802_11_rx_bss_trans_mgmt
|
|
|
+ MAC2STR(addr), reason, hex ? " neighbor=" : "", hex);
|
|
|
+ os_free(hex);
|
|
|
|
|
|
- ieee802_11_send_bss_trans_mgmt_request(hapd, addr, dialog_token);
|
|
|
+ if (!hostapd_ubus_notify_bss_transition_query(hapd, addr, dialog_token, reason, pos, end - pos))
|
|
|
@@ -535,7 +535,7 @@
|
|
|
}
|
|
|
|
|
|
|
|
|
-@@ -464,7 +465,7 @@ static void ieee802_11_rx_bss_trans_mgmt
|
|
|
+@@ -477,7 +478,7 @@ static void ieee802_11_rx_bss_trans_mgmt
|
|
|
size_t len)
|
|
|
{
|
|
|
u8 dialog_token, status_code, bss_termination_delay;
|
|
|
@@ -544,7 +544,7 @@
|
|
|
int enabled = hapd->conf->bss_transition;
|
|
|
struct sta_info *sta;
|
|
|
|
|
|
-@@ -511,6 +512,7 @@ static void ieee802_11_rx_bss_trans_mgmt
|
|
|
+@@ -524,6 +525,7 @@ static void ieee802_11_rx_bss_trans_mgmt
|
|
|
wpa_printf(MSG_DEBUG, "WNM: not enough room for Target BSSID field");
|
|
|
return;
|
|
|
}
|
|
|
@@ -552,7 +552,7 @@
|
|
|
sta->agreed_to_steer = 1;
|
|
|
eloop_cancel_timeout(ap_sta_reset_steer_flag_timer, hapd, sta);
|
|
|
eloop_register_timeout(2, 0, ap_sta_reset_steer_flag_timer,
|
|
|
-@@ -530,6 +532,10 @@ static void ieee802_11_rx_bss_trans_mgmt
|
|
|
+@@ -543,6 +545,10 @@ static void ieee802_11_rx_bss_trans_mgmt
|
|
|
MAC2STR(addr), status_code, bss_termination_delay);
|
|
|
}
|
|
|
|