Commit 4b72b91a authored by Cy Schubert's avatar Cy Schubert
Browse files

wpa: Redo import wpa_supplicant/hostapd commit 14ab4a816

This is the November update to vendor/wpa committed upstream 2021-11-26.

MFC after:	1 month
parent 2dfc1f73
......@@ -13,6 +13,7 @@
#include "utils/common.h"
#include "utils/uuid.h"
#include "utils/crc32.h"
#include "common/ieee802_11_defs.h"
#include "common/sae.h"
#include "crypto/sha256.h"
......@@ -2396,16 +2397,19 @@ static int hostapd_config_fill(struct hostapd_config *conf,
wpa_printf(MSG_INFO, "Line %d: DEPRECATED: 'dump_file' configuration variable is not used anymore",
line);
} else if (os_strcmp(buf, "ssid") == 0) {
bss->ssid.ssid_len = os_strlen(pos);
if (bss->ssid.ssid_len > SSID_MAX_LEN ||
bss->ssid.ssid_len < 1) {
struct hostapd_ssid *ssid = &bss->ssid;
ssid->ssid_len = os_strlen(pos);
if (ssid->ssid_len > SSID_MAX_LEN || ssid->ssid_len < 1) {
wpa_printf(MSG_ERROR, "Line %d: invalid SSID '%s'",
line, pos);
return 1;
}
os_memcpy(bss->ssid.ssid, pos, bss->ssid.ssid_len);
bss->ssid.ssid_set = 1;
os_memcpy(ssid->ssid, pos, ssid->ssid_len);
ssid->ssid_set = 1;
ssid->short_ssid = crc32(ssid->ssid, ssid->ssid_len);
} else if (os_strcmp(buf, "ssid2") == 0) {
struct hostapd_ssid *ssid = &bss->ssid;
size_t slen;
char *str = wpa_config_parse_string(pos, &slen);
if (str == NULL || slen < 1 || slen > SSID_MAX_LEN) {
......@@ -2414,9 +2418,10 @@ static int hostapd_config_fill(struct hostapd_config *conf,
os_free(str);
return 1;
}
os_memcpy(bss->ssid.ssid, str, slen);
bss->ssid.ssid_len = slen;
bss->ssid.ssid_set = 1;
os_memcpy(ssid->ssid, str, slen);
ssid->ssid_len = slen;
ssid->ssid_set = 1;
ssid->short_ssid = crc32(ssid->ssid, ssid->ssid_len);
os_free(str);
} else if (os_strcmp(buf, "utf8_ssid") == 0) {
bss->ssid.utf8_ssid = atoi(pos) > 0;
......@@ -3515,6 +3520,8 @@ static int hostapd_config_fill(struct hostapd_config *conf,
conf->he_op.he_twt_responder = atoi(pos);
} else if (os_strcmp(buf, "he_rts_threshold") == 0) {
conf->he_op.he_rts_threshold = atoi(pos);
} else if (os_strcmp(buf, "he_er_su_disable") == 0) {
conf->he_op.he_er_su_disable = atoi(pos);
} else if (os_strcmp(buf, "he_basic_mcs_nss_set") == 0) {
conf->he_op.he_basic_mcs_nss_set = atoi(pos);
} else if (os_strcmp(buf, "he_mu_edca_qos_info_param_count") == 0) {
......@@ -4705,6 +4712,8 @@ static int hostapd_config_fill(struct hostapd_config *conf,
if (get_hex_config(bss->ext_capa, EXT_CAPA_MAX_LEN,
line, "ext_capa", pos))
return 1;
} else if (os_strcmp(buf, "rnr") == 0) {
bss->rnr = atoi(pos);
} else {
wpa_printf(MSG_ERROR,
"Line %d: unknown configuration item '%s'",
......
......@@ -840,7 +840,7 @@ static int hostapd_ctrl_iface_bss_tm_req(struct hostapd_data *hapd,
const char *pos, *end;
int disassoc_timer = 0;
struct sta_info *sta;
u8 req_mode = 0, valid_int = 0x01;
u8 req_mode = 0, valid_int = 0x01, dialog_token = 0x01;
u8 bss_term_dur[12];
char *url = NULL;
int ret;
......@@ -878,6 +878,12 @@ static int hostapd_ctrl_iface_bss_tm_req(struct hostapd_data *hapd,
valid_int = atoi(pos);
}
pos = os_strstr(cmd, " dialog_token=");
if (pos) {
pos += 14;
dialog_token = atoi(pos);
}
pos = os_strstr(cmd, " bss_term=");
if (pos) {
pos += 10;
......@@ -984,7 +990,7 @@ static int hostapd_ctrl_iface_bss_tm_req(struct hostapd_data *hapd,
#endif /* CONFIG_MBO */
ret = wnm_send_bss_tm_req(hapd, sta, req_mode, disassoc_timer,
valid_int, bss_term_dur, url,
valid_int, bss_term_dur, dialog_token, url,
nei_len ? nei_rep : NULL, nei_len,
mbo_len ? mbo : NULL, mbo_len);
#ifdef CONFIG_MBO
......@@ -1455,10 +1461,10 @@ static int hostapd_ctrl_iface_set(struct hostapd_data *hapd, char *cmd)
wps_version_number & 0x0f);
hostapd_wps_update_ie(hapd);
}
} else if (os_strcasecmp(cmd, "wps_testing_dummy_cred") == 0) {
wps_testing_dummy_cred = atoi(value);
wpa_printf(MSG_DEBUG, "WPS: Testing - dummy_cred=%d",
wps_testing_dummy_cred);
} else if (os_strcasecmp(cmd, "wps_testing_stub_cred") == 0) {
wps_testing_stub_cred = atoi(value);
wpa_printf(MSG_DEBUG, "WPS: Testing - stub_cred=%d",
wps_testing_stub_cred);
} else if (os_strcasecmp(cmd, "wps_corrupt_pkhash") == 0) {
wps_corrupt_pkhash = atoi(value);
wpa_printf(MSG_DEBUG, "WPS: Testing - wps_corrupt_pkhash=%d",
......@@ -3185,8 +3191,9 @@ static int hostapd_ctrl_iface_set_neighbor(struct hostapd_data *hapd, char *buf)
u8 bssid[ETH_ALEN];
struct wpabuf *nr, *lci = NULL, *civic = NULL;
int stationary = 0;
int bss_parameters = 0;
char *tmp;
int ret;
int ret = -1;
if (!(hapd->conf->radio_measurements[0] &
WLAN_RRM_CAPS_NEIGHBOR_REPORT)) {
......@@ -3240,8 +3247,7 @@ static int hostapd_ctrl_iface_set_neighbor(struct hostapd_data *hapd, char *buf)
if (!lci) {
wpa_printf(MSG_ERROR,
"CTRL: SET_NEIGHBOR: Bad LCI subelement");
wpabuf_free(nr);
return -1;
goto fail;
}
}
......@@ -3257,9 +3263,7 @@ static int hostapd_ctrl_iface_set_neighbor(struct hostapd_data *hapd, char *buf)
if (!civic) {
wpa_printf(MSG_ERROR,
"CTRL: SET_NEIGHBOR: Bad civic subelement");
wpabuf_free(nr);
wpabuf_free(lci);
return -1;
goto fail;
}
}
......@@ -3269,10 +3273,21 @@ static int hostapd_ctrl_iface_set_neighbor(struct hostapd_data *hapd, char *buf)
if (os_strstr(buf, "stat"))
stationary = 1;
tmp = os_strstr(buf, "bss_parameter=");
if (tmp) {
bss_parameters = atoi(tmp + 14);
if (bss_parameters < 0 || bss_parameters > 0xff) {
wpa_printf(MSG_ERROR,
"CTRL: SET_NEIGHBOR: Bad bss_parameters subelement");
goto fail;
}
}
set:
ret = hostapd_neighbor_set(hapd, bssid, &ssid, nr, lci, civic,
stationary);
stationary, bss_parameters);
fail:
wpabuf_free(nr);
wpabuf_free(lci);
wpabuf_free(civic);
......@@ -4470,7 +4485,7 @@ static void hostapd_ctrl_iface_flush(struct hapd_interfaces *interfaces)
{
#ifdef CONFIG_WPS_TESTING
wps_version_number = 0x20;
wps_testing_dummy_cred = 0;
wps_testing_stub_cred = 0;
wps_corrupt_pkhash = 0;
#endif /* CONFIG_WPS_TESTING */
......
......@@ -3,7 +3,7 @@
# 4.3.20 Test Set 20. SQN is the last used SQN value.
# These values can be used for both UMTS (EAP-AKA) and GSM (EAP-SIM)
# authentication. In case of GSM/EAP-SIM, AMF and SQN values are not used, but
# dummy values will need to be included in this file.
# stub values will need to be included in this file.
# IMSI Ki OPc AMF SQN [RES_len]
232010000000000 90dca4eda45b53cf0f12d7c9c3bc6a89 cb9cccc4b9258e6dca4760379fb82581 61df 000000000000
......
......@@ -841,6 +841,11 @@ wmm_ac_vo_acm=0
# unsigned integer = duration in units of 16 us
#he_rts_threshold=0
#he_er_su_disable: Disable 242-tone HE ER SU PPDU reception by the AP
# 0 = enable reception (default)
# 1 = disable reception
#he_er_su_disable=0
# HE operating channel information; see matching vht_* parameters for details.
# he_oper_centr_freq_seg0_idx field is used to indicate center frequency of 80
# and 160 MHz bandwidth operation. In 80+80 MHz operation, it is the center
......@@ -1832,7 +1837,7 @@ own_ip_addr=127.0.0.1
#assoc_sa_query_retry_timeout=201
# ocv: Operating Channel Validation
# This is a countermeasure against multi-channel man-in-the-middle attacks.
# This is a countermeasure against multi-channel on-path attacks.
# Enabling this depends on the driver's support for OCV when the driver SME is
# used. If hostapd SME is used, this will be enabled just based on this
# configuration.
......@@ -2916,6 +2921,9 @@ own_ip_addr=127.0.0.1
# that allows sending of such data. Default: 0.
#stationary_ap=0
# Enable reduced neighbor reporting (RNR)
#rnr=0
##### Airtime policy configuration ###########################################
# Set the airtime policy operating mode:
......
......@@ -1048,7 +1048,7 @@ static char ** hostapd_complete_set(const char *str, int pos)
int arg = get_cmd_arg_num(str, pos);
const char *fields[] = {
#ifdef CONFIG_WPS_TESTING
"wps_version_number", "wps_testing_dummy_cred",
"wps_version_number", "wps_testing_stub_cred",
"wps_corrupt_pkhash",
#endif /* CONFIG_WPS_TESTING */
#ifdef CONFIG_INTERWORKING
......
......@@ -309,8 +309,6 @@ acs_survey_interference_factor(struct freq_survey *survey, s8 min_nf)
else if (survey->filled & SURVEY_HAS_CHAN_TIME_RX)
busy = survey->channel_time_rx;
else {
/* This shouldn't really happen as survey data is checked in
* acs_sanity_check() */
wpa_printf(MSG_ERROR, "ACS: Survey data missing");
return 0;
}
......@@ -392,7 +390,7 @@ static int acs_usable_bw40_chan(const struct hostapd_channel_data *chan)
static int acs_usable_bw80_chan(const struct hostapd_channel_data *chan)
{
const int allowed[] = { 5180, 5260, 5550, 5580, 5660, 5745, 5955, 6035,
const int allowed[] = { 5180, 5260, 5500, 5580, 5660, 5745, 5955, 6035,
6115, 6195, 6275, 6355, 6435, 6515, 6595, 6675,
6755, 6835, 6915, 6995 };
unsigned int i;
......
......@@ -273,7 +273,7 @@ struct hostapd_config * hostapd_config_defaults(void)
conf->he_op.he_basic_mcs_nss_set = 0xfffc;
conf->he_op.he_bss_color_disabled = 1;
conf->he_op.he_bss_color_partial = 0;
conf->he_op.he_bss_color = 1;
conf->he_op.he_bss_color = os_random() % 63 + 1;
conf->he_op.he_twt_responder = 1;
conf->he_6ghz_max_mpdu = 2;
conf->he_6ghz_max_ampdu_len_exp = 7;
......@@ -1423,6 +1423,15 @@ static int hostapd_config_check_bss(struct hostapd_bss_config *bss,
}
#endif /* CONFIG_SAE_PK */
#ifdef CONFIG_FILS
if (full_config && bss->fils_discovery_min_int &&
bss->unsol_bcast_probe_resp_interval) {
wpa_printf(MSG_ERROR,
"Cannot enable both FILS discovery and unsolicited broadcast Probe Response at the same time");
return -1;
}
#endif /* CONFIG_FILS */
return 0;
}
......
......@@ -894,6 +894,8 @@ struct hostapd_bss_config {
u8 ext_capa_mask[EXT_CAPA_MAX_LEN];
u8 ext_capa[EXT_CAPA_MAX_LEN];
u8 rnr;
};
/**
......@@ -916,6 +918,7 @@ struct he_operation {
u8 he_twt_required;
u8 he_twt_responder;
u16 he_rts_threshold;
u8 he_er_su_disable;
u16 he_basic_mcs_nss_set;
};
......
......@@ -469,6 +469,7 @@ static u8 * hostapd_gen_probe_resp(struct hostapd_data *hapd,
}
#endif /* CONFIG_IEEE80211AX */
buflen += hostapd_eid_rnr_len(hapd, WLAN_FC_STYPE_PROBE_RESP);
buflen += hostapd_mbo_ie_len(hapd);
buflen += hostapd_eid_owe_trans_len(hapd);
buflen += hostapd_eid_dpp_cc_len(hapd);
......@@ -573,6 +574,7 @@ static u8 * hostapd_gen_probe_resp(struct hostapd_data *hapd,
(hapd->iconf->ieee80211ax && !hapd->conf->disable_11ax))
pos = hostapd_eid_wb_chsw_wrapper(hapd, pos);
pos = hostapd_eid_rnr(hapd, pos, WLAN_FC_STYPE_PROBE_RESP);
pos = hostapd_eid_fils_indic(hapd, pos, 0);
pos = hostapd_get_rsnxe(hapd, pos, epos - pos);
......@@ -642,7 +644,8 @@ static u8 * hostapd_gen_probe_resp(struct hostapd_data *hapd,
enum ssid_match_result {
NO_SSID_MATCH,
EXACT_SSID_MATCH,
WILDCARD_SSID_MATCH
WILDCARD_SSID_MATCH,
CO_LOCATED_SSID_MATCH,
};
static enum ssid_match_result ssid_match(struct hostapd_data *hapd,
......@@ -653,7 +656,9 @@ static enum ssid_match_result ssid_match(struct hostapd_data *hapd,
size_t short_ssid_list_len)
{
const u8 *pos, *end;
struct hostapd_iface *iface = hapd->iface;
int wildcard = 0;
size_t i, j;
if (ssid_len == 0)
wildcard = 1;
......@@ -687,7 +692,33 @@ static enum ssid_match_result ssid_match(struct hostapd_data *hapd,
}
}
return wildcard ? WILDCARD_SSID_MATCH : NO_SSID_MATCH;
if (wildcard)
return WILDCARD_SSID_MATCH;
if (!iface->interfaces || iface->interfaces->count <= 1 ||
is_6ghz_op_class(hapd->iconf->op_class))
return NO_SSID_MATCH;
for (i = 0; i < iface->interfaces->count; i++) {
struct hostapd_iface *colocated;
colocated = iface->interfaces->iface[i];
if (colocated == iface ||
!is_6ghz_op_class(colocated->conf->op_class))
continue;
for (j = 0; j < colocated->num_bss; j++) {
struct hostapd_bss_config *conf;
conf = colocated->bss[j]->conf;
if (ssid_len == conf->ssid.ssid_len &&
os_memcmp(ssid, conf->ssid.ssid, ssid_len) == 0)
return CO_LOCATED_SSID_MATCH;
}
}
return NO_SSID_MATCH;
}
......@@ -1284,6 +1315,8 @@ static u8 * hostapd_gen_fils_discovery(struct hostapd_data *hapd, size_t *len)
total_len += 3;
}
total_len += hostapd_eid_rnr_len(hapd, WLAN_FC_STYPE_ACTION);
pos = hostapd_eid_fils_indic(hapd, buf, 0);
buf_len = pos - buf;
total_len += buf_len;
......@@ -1352,6 +1385,8 @@ static u8 * hostapd_gen_fils_discovery(struct hostapd_data *hapd, size_t *len)
/* Fill in the Length field value */
*length_pos = pos - (length_pos + 1);
pos = hostapd_eid_rnr(hapd, pos, WLAN_FC_STYPE_ACTION);
/* FILS Indication element */
if (buf_len) {
os_memcpy(pos, buf, buf_len);
......@@ -1438,6 +1473,7 @@ int ieee802_11_build_ap_params(struct hostapd_data *hapd,
}
#endif /* CONFIG_IEEE80211AX */
tail_len += hostapd_eid_rnr_len(hapd, WLAN_FC_STYPE_BEACON);
tail_len += hostapd_mbo_ie_len(hapd);
tail_len += hostapd_eid_owe_trans_len(hapd);
tail_len += hostapd_eid_dpp_cc_len(hapd);
......@@ -1562,6 +1598,7 @@ int ieee802_11_build_ap_params(struct hostapd_data *hapd,
(hapd->iconf->ieee80211ax && !hapd->conf->disable_11ax))
tailpos = hostapd_eid_wb_chsw_wrapper(hapd, tailpos);
tailpos = hostapd_eid_rnr(hapd, tailpos, WLAN_FC_STYPE_BEACON);
tailpos = hostapd_eid_fils_indic(hapd, tailpos, 0);
tailpos = hostapd_get_rsnxe(hapd, tailpos, tailend - tailpos);
......@@ -1743,7 +1780,7 @@ void ieee802_11_free_ap_params(struct wpa_driver_ap_params *params)
}
int ieee802_11_set_beacon(struct hostapd_data *hapd)
static int __ieee802_11_set_beacon(struct hostapd_data *hapd)
{
struct wpa_driver_ap_params params;
struct hostapd_freq_params freq;
......@@ -1832,6 +1869,42 @@ int ieee802_11_set_beacon(struct hostapd_data *hapd)
}
int ieee802_11_set_beacon(struct hostapd_data *hapd)
{
struct hostapd_iface *iface = hapd->iface;
int ret;
size_t i, j;
bool is_6g;
ret = __ieee802_11_set_beacon(hapd);
if (ret != 0)
return ret;
if (!iface->interfaces || iface->interfaces->count <= 1)
return 0;
/* Update Beacon frames in case of 6 GHz colocation */
is_6g = is_6ghz_op_class(iface->conf->op_class);
for (j = 0; j < iface->interfaces->count; j++) {
struct hostapd_iface *colocated;
colocated = iface->interfaces->iface[j];
if (colocated == iface || !colocated || !colocated->conf)
continue;
if (is_6g == is_6ghz_op_class(colocated->conf->op_class))
continue;
for (i = 0; i < colocated->num_bss; i++) {
if (colocated->bss[i] && colocated->bss[i]->started)
__ieee802_11_set_beacon(colocated->bss[i]);
}
}
return 0;
}
int ieee802_11_set_beacons(struct hostapd_iface *iface)
{
size_t i;
......
......@@ -50,9 +50,35 @@ static size_t hostapd_write_ht_mcs_bitmask(char *buf, size_t buflen,
}
static int hostapd_get_sta_tx_rx(struct hostapd_data *hapd,
struct sta_info *sta,
char *buf, size_t buflen)
static int hostapd_get_sta_conn_time(struct sta_info *sta,
struct hostap_sta_driver_data *data,
char *buf, size_t buflen)
{
struct os_reltime age;
unsigned long secs;
int ret;
if (sta->connected_time.sec) {
/* Locally maintained time in AP mode */
os_reltime_age(&sta->connected_time, &age);
secs = (unsigned long) age.sec;
} else if (data->flags & STA_DRV_DATA_CONN_TIME) {
/* Time from the driver in mesh mode */
secs = data->connected_sec;
} else {
return 0;
}
ret = os_snprintf(buf, buflen, "connected_time=%lu\n", secs);
if (os_snprintf_error(buflen, ret))
return 0;
return ret;
}
static int hostapd_get_sta_info(struct hostapd_data *hapd,
struct sta_info *sta,
char *buf, size_t buflen)
{
struct hostap_sta_driver_data data;
int ret;
......@@ -160,26 +186,9 @@ static int hostapd_get_sta_tx_rx(struct hostapd_data *hapd,
len += ret;
}
return len;
}
len += hostapd_get_sta_conn_time(sta, &data, buf + len, buflen - len);
static int hostapd_get_sta_conn_time(struct sta_info *sta,
char *buf, size_t buflen)
{
struct os_reltime age;
int ret;
if (!sta->connected_time.sec)
return 0;
os_reltime_age(&sta->connected_time, &age);
ret = os_snprintf(buf, buflen, "connected_time=%u\n",
(unsigned int) age.sec);
if (os_snprintf_error(buflen, ret))
return 0;
return ret;
return len;
}
......@@ -263,8 +272,7 @@ static int hostapd_ctrl_iface_sta_mib(struct hostapd_data *hapd,
if (res >= 0)
len += res;
len += hostapd_get_sta_tx_rx(hapd, sta, buf + len, buflen - len);
len += hostapd_get_sta_conn_time(sta, buf + len, buflen - len);
len += hostapd_get_sta_info(hapd, sta, buf + len, buflen - len);
#ifdef CONFIG_SAE
if (sta->sae && sta->sae->state == SAE_ACCEPTED) {
......
......@@ -88,6 +88,7 @@ static void handle_dhcp(void *ctx, const u8 *src_addr, const u8 *buf,
}
}
#ifdef CONFIG_HS20
if (hapd->conf->disable_dgaf && is_broadcast_ether_addr(buf)) {
for (sta = hapd->sta_list; sta; sta = sta->next) {
if (!(sta->flags & WLAN_STA_AUTHORIZED))
......@@ -96,6 +97,7 @@ static void handle_dhcp(void *ctx, const u8 *src_addr, const u8 *buf,
(u8 *) buf, len);
}
}
#endif /* CONFIG_HS20 */
if (msgtype == DHCPACK) {
if (b->your_ip == 0)
......
......@@ -2276,6 +2276,8 @@ void hostapd_dpp_deinit(struct hostapd_data *hapd)
eloop_cancel_timeout(hostapd_dpp_conn_status_result_wait_timeout, hapd,
NULL);
hostapd_dpp_chirp_stop(hapd);
if (hapd->iface->interfaces)
dpp_controller_stop_for_ctx(hapd->iface->interfaces->dpp, hapd);
#endif /* CONFIG_DPP2 */
dpp_auth_deinit(hapd->dpp_auth);
hapd->dpp_auth = NULL;
......@@ -2387,6 +2389,7 @@ hostapd_dpp_chirp_scan_res_handler(struct hostapd_iface *iface)
unsigned int i;
struct hostapd_hw_modes *mode;
int c;
bool chan6 = hapd->iface->hw_features == NULL;
if (!bi)
return;
......@@ -2406,7 +2409,21 @@ hostapd_dpp_chirp_scan_res_handler(struct hostapd_iface *iface)
}
/* Preferred chirping channels */
int_array_add_unique(&hapd->dpp_chirp_freqs, 2437);
mode = dpp_get_mode(hapd, HOSTAPD_MODE_IEEE80211G);
if (mode) {
for (c = 0; c < mode->num_channels; c++) {
struct hostapd_channel_data *chan = &mode->channels[c];
if (chan->flag & (HOSTAPD_CHAN_DISABLED |
HOSTAPD_CHAN_RADAR) ||
chan->freq != 2437)
continue;
chan6 = true;
break;
}
}
if (chan6)
int_array_add_unique(&hapd->dpp_chirp_freqs, 2437);
mode = dpp_get_mode(hapd, HOSTAPD_MODE_IEEE80211A);
if (mode) {
......
......@@ -138,6 +138,8 @@ struct hostapd_neighbor_entry {
/* LCI update time */
struct os_time lci_date;
int stationary;
u32 short_ssid;
u8 bss_parameters;
};
struct hostapd_sae_commit_queue {
......
......@@ -838,6 +838,8 @@ static int hostapd_is_usable_edmg(struct hostapd_iface *iface)
iface->freq, NULL,
iface->hw_features,
iface->num_hw_features);
if (!pri_chan)
return 0;
hostapd_encode_edmg_chan(iface->conf->enable_edmg,
iface->conf->edmg_channel,
pri_chan->chan,
......
......@@ -2398,7 +2398,7 @@ static int pasn_wd_handle_sae_commit(struct hostapd_data *hapd,
buf_len = wpabuf_len(wd);
if (buf_len < 6) {
wpa_printf(MSG_DEBUG, "PASN: SAE buffer too short. len=%lu",
wpa_printf(MSG_DEBUG, "PASN: SAE buffer too short. len=%zu",
buf_len);
return -1;
}
......@@ -2474,7 +2474,7 @@ static int pasn_wd_handle_sae_confirm(struct hostapd_data *hapd,
buf_len = wpabuf_len(wd);
if (buf_len < 6) {
wpa_printf(MSG_DEBUG, "PASN: SAE buffer too short. len=%lu",
wpa_printf(MSG_DEBUG, "PASN: SAE buffer too short. len=%zu",
buf_len);
return -1;
}
......@@ -2704,7 +2704,7 @@ static int pasn_wd_handle_fils(struct hostapd_data *hapd, struct sta_info *sta,
buf_len = wpabuf_len(wd);
if (buf_len < 6) {
wpa_printf(MSG_DEBUG, "PASN: FILS: Buffer too short. len=%lu",
wpa_printf(MSG_DEBUG, "PASN: FILS: Buffer too short. len=%zu",