CHROMIUM: Override SSID logging
This is a short-term stop-gap intended to reduce PII in wpa_supplicant
logs. Because wpa_ssid_txt is generally used for logging, co-opt this
symbol to hash SSID information.
For control channel data, provide and use explicit control symbols
(i.e., wpa_ctrl_ssid_txt). To support testing, any call site that uses
both wpa_msg* and wpa_ssid_txt is converted to wpa_msg*_ctrl to avoid
logging.
Note that wpa_dbg behaves like wpa_msg, but it can be removed from build
to reduce binary size. As such, it is not a control interface and does
not require update.
wlan0: Selecting BSS from priority group 0
wlan0: 0: 62:b7:6e:cd:c7:b0 ssid='03600e8c3c95' wpa_ie_len=0...
wlan0: skip - SSID mismatch
wlan0: 1: 60:b7:6e:cd:c7:b1 ssid='31dc8895fb56' wpa_ie_len=0...
wlan0: selected based on RSN IE
wlan0: selected BSS 60:b7:6e:cd:c7:b1 ssid='31dc8895fb56'
BUG=b:183219113
TEST=`auth_serv/update.sh` succeeds.
TEST=`module_wpa_supplicant module_hostapd scan_random_mac` succeeds.
TEST=`-f oce scan owe wpas_wmm_ac bgscan kernel wep ieee8021x ieee8021x\
monitor_interface wpas_config pmksa_cache dfs sae ap_ft ssid\
cfg80211 radius eap_proto connect_cmd autoscan` succeeds.
TEST=`-f dbus` succeeds (`failed tests: dbus_network`).
Change-Id: Iac66608f0d091c54ad4a83936608b9d1150803f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/hostap/+/2818535
Tested-by: Joshua Emele <jemele@chromium.org>
Reviewed-by: Matthew Wang <matthewmwang@chromium.org>
Reviewed-by: Brian Norris <briannorris@chromium.org>
diff --git a/hostapd/Makefile b/hostapd/Makefile
index 7478cc0..2ac6ee0 100644
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -156,6 +156,7 @@
OBJS += ../src/utils/wpa_debug.o
OBJS_c += ../src/utils/wpa_debug.o
OBJS += ../src/utils/wpabuf.o
+OBJS_c += ../src/utils/wpabuf.o
OBJS += ../src/utils/os_$(CONFIG_OS).o
OBJS += ../src/utils/ip_addr.o
@@ -720,6 +721,7 @@
LIBS += -lssl
endif
OBJS += ../src/crypto/crypto_openssl.o
+OBJS_c += ../src/crypto/crypto_openssl.o
HOBJS += ../src/crypto/crypto_openssl.o
ifdef NEED_FIPS186_2_PRF
OBJS += ../src/crypto/fips_prf_openssl.o
@@ -727,6 +729,7 @@
NEED_SHA256=y
NEED_TLS_PRF_SHA256=y
LIBS += -lcrypto
+LIBS_c += -lcrypto
LIBS_h += -lcrypto
LIBS_n += -lcrypto
ifdef CONFIG_TLS_ADD_DL
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
index 0f6dfa1..ccba1a9 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -1188,8 +1188,8 @@
ret = os_snprintf(pos, end - pos, "bssid=" MACSTR "\n"
"ssid=%s\n",
MAC2STR(hapd->own_addr),
- wpa_ssid_txt(hapd->conf->ssid.ssid,
- hapd->conf->ssid.ssid_len));
+ wpa_ctrl_ssid_txt(hapd->conf->ssid.ssid,
+ hapd->conf->ssid.ssid_len));
if (os_snprintf_error(end - pos, ret))
return pos - buf;
pos += ret;
diff --git a/src/ap/ctrl_iface_ap.c b/src/ap/ctrl_iface_ap.c
index 2c4953d..36098ba 100644
--- a/src/ap/ctrl_iface_ap.c
+++ b/src/ap/ctrl_iface_ap.c
@@ -811,8 +811,8 @@
(int) i, bss->conf->iface,
(int) i, MAC2STR(bss->own_addr),
(int) i,
- wpa_ssid_txt(bss->conf->ssid.ssid,
- bss->conf->ssid.ssid_len),
+ wpa_ctrl_ssid_txt(bss->conf->ssid.ssid,
+ bss->conf->ssid.ssid_len),
(int) i, bss->num_sta);
if (os_snprintf_error(buflen - len, ret))
return len;
diff --git a/src/ap/dpp_hostapd.c b/src/ap/dpp_hostapd.c
index 697c3ba..4cba425 100644
--- a/src/ap/dpp_hostapd.c
+++ b/src/ap/dpp_hostapd.c
@@ -612,9 +612,12 @@
wpa_msg(hapd->msg_ctx, MSG_INFO, DPP_EVENT_CONF_RECEIVED);
wpa_msg(hapd->msg_ctx, MSG_INFO, DPP_EVENT_CONFOBJ_AKM "%s",
dpp_akm_str(auth->akm));
- if (auth->ssid_len)
- wpa_msg(hapd->msg_ctx, MSG_INFO, DPP_EVENT_CONFOBJ_SSID "%s",
- wpa_ssid_txt(auth->ssid, auth->ssid_len));
+ if (auth->ssid_len) {
+ wpa_printf(hapd->msg_ctx, MSG_INFO, DPP_EVENT_CONFOBJ_SSID "%s",
+ wpa_ssid_txt(auth->ssid, auth->ssid_len));
+ wpa_msg_ctrl(hapd->msg_ctx, MSG_INFO, DPP_EVENT_CONFOBJ_SSID "%s",
+ wpa_ctrl_ssid_txt(auth->ssid, auth->ssid_len));
+ }
if (auth->connector) {
/* TODO: Save the Connector and consider using a command
* to fetch the value instead of sending an event with
diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c
index a08ba02..80a96f7 100644
--- a/src/p2p/p2p.c
+++ b/src/p2p/p2p.c
@@ -4323,8 +4323,8 @@
if (dev->oper_ssid_len) {
res = os_snprintf(pos, end - pos,
"oper_ssid=%s\n",
- wpa_ssid_txt(dev->oper_ssid,
- dev->oper_ssid_len));
+ wpa_ctrl_ssid_txt(dev->oper_ssid,
+ dev->oper_ssid_len));
if (os_snprintf_error(end - pos, res))
return pos - buf;
pos += res;
diff --git a/src/utils/common.c b/src/utils/common.c
index 27bf435..7f29372 100644
--- a/src/utils/common.c
+++ b/src/utils/common.c
@@ -603,9 +603,53 @@
return len;
}
+#include "crypto/crypto.h"
+#include "crypto/sha1.h"
+#define WPA_SHA1_TXT_MAX_LEN (12 + 1) /* Intentionally only provide 6 octets */
/**
- * wpa_ssid_txt - Convert SSID to a printable string
+ * wpa_sha1_txt - Convert binary data to a printable hash
+ * @data: Buffer containing the input data to be hashed
+ * @data_len: Length of the input data in octets
+ * @output: Buffer to store the output string
+ * @output_len: Length of the output buffer in octets
+ * Returns: Pointer to the output buffer containing a printable string
+ *
+ * An internal IV is generated once and is used to pepper the hash.
+ */
+static const char * wpa_sha1_txt(const u8 *data, size_t data_len,
+ char *output, size_t output_len)
+{
+ static int iv_initialized;
+ static u8 iv[SHA1_MAC_LEN];
+
+ size_t iv_len = sizeof(iv);
+ const u8 *sha1_vector_addr[] = { iv, data };
+ size_t sha1_vector_len[] = { iv_len, data_len };
+ u8 hash[SHA1_MAC_LEN];
+
+ if (!iv_initialized) {
+ if (os_get_random(iv, iv_len) < 0) {
+ wpa_printf(MSG_WARNING, "Failed to initialize IV");
+ } else {
+ iv_initialized = 1;
+ }
+ }
+
+ /* Hash the SSID and on success use it. */
+ if (iv_initialized &&
+ sha1_vector(ARRAY_SIZE(sha1_vector_addr), sha1_vector_addr,
+ sha1_vector_len, hash) == 0) {
+ wpa_snprintf_hex(output, output_len, hash, sizeof(hash));
+ } else {
+ os_strlcpy(output, "UNAVAILABLE", output_len);
+ }
+ return output;
+}
+
+
+/**
+ * wpa_ctrl_ssid_txt - Convert SSID to a printable string
* @ssid: SSID (32-octet string)
* @ssid_len: Length of ssid in octets
* Returns: Pointer to a printable string
@@ -618,6 +662,32 @@
* time, i.e., this is not re-entrant and the returned buffer must be used
* before calling this again.
*/
+const char * wpa_ctrl_ssid_txt(const u8 *ssid, size_t ssid_len)
+{
+ static char ssid_txt[SSID_MAX_LEN * 4 + 1];
+
+ if (ssid == NULL) {
+ ssid_txt[0] = '\0';
+ return ssid_txt;
+ }
+
+ printf_encode(ssid_txt, sizeof(ssid_txt), ssid, ssid_len);
+ return ssid_txt;
+}
+
+/**
+ * wpa_ssid_txt - Hash and convert SSID to a printable string
+ * @ssid: SSID (32-octet string)
+ * @ssid_len: Length of ssid in octets
+ * Returns: Pointer to a printable string
+ *
+ * This function can be used to hash and convert SSIDs into printable form that
+ * does not reveal the actual value of the SSID.
+ *
+ * This function uses a static buffer, so only one call can be used at the
+ * time, i.e., this is not re-entrant and the returned buffer must be used
+ * before calling this again.
+ */
const char * wpa_ssid_txt(const u8 *ssid, size_t ssid_len)
{
static char ssid_txt[SSID_MAX_LEN * 4 + 1];
@@ -627,8 +697,8 @@
return ssid_txt;
}
- printf_encode(ssid_txt, sizeof(ssid_txt), ssid, ssid_len);
- return ssid_txt;
+ /* Intentionally only provide 6 octets */
+ return wpa_sha1_txt(ssid, ssid_len, ssid_txt, WPA_SHA1_TXT_MAX_LEN);
}
diff --git a/src/utils/common.h b/src/utils/common.h
index 1741145..717b76e 100644
--- a/src/utils/common.h
+++ b/src/utils/common.h
@@ -500,6 +500,7 @@
void printf_encode(char *txt, size_t maxlen, const u8 *data, size_t len);
size_t printf_decode(u8 *buf, size_t maxlen, const char *str);
+const char * wpa_ctrl_ssid_txt(const u8 *ssid, size_t ssid_len);
const char * wpa_ssid_txt(const u8 *ssid, size_t ssid_len);
char * wpa_config_parse_string(const char *value, size_t *len);
diff --git a/src/utils/utils_module_tests.c b/src/utils/utils_module_tests.c
index 3af4fcd..8bf5e27 100644
--- a/src/utils/utils_module_tests.c
+++ b/src/utils/utils_module_tests.c
@@ -424,7 +424,7 @@
txt = wpa_ssid_txt(ssid, sizeof(ssid));
len = os_strlen(txt);
/* Verify that SSID_MAX_LEN * 4 buffer limit is enforced. */
- if (len != SSID_MAX_LEN * 4) {
+ if (len > SSID_MAX_LEN * 4) {
wpa_printf(MSG_ERROR,
"Unexpected wpa_ssid_txt() result with too long SSID");
errors++;
diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
index f1384d5..c85e272 100644
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -111,6 +111,7 @@
OBJS_p += ../src/utils/wpabuf.o
OBJS_c = wpa_cli.o ../src/common/wpa_ctrl.o
OBJS_c += ../src/utils/wpa_debug.o
+OBJS_c += ../src/utils/wpabuf.o
OBJS_c += ../src/utils/common.o
OBJS_c += ../src/common/cli.o
OBJS += wmm_ac.o
@@ -1108,6 +1109,7 @@
endif
OBJS += ../src/crypto/crypto_openssl.o
OBJS_p += ../src/crypto/crypto_openssl.o
+OBJS_c += ../src/crypto/crypto_openssl.o
OBJS_priv += ../src/crypto/crypto_openssl.o
ifdef NEED_FIPS186_2_PRF
OBJS += ../src/crypto/fips_prf_openssl.o
@@ -1116,6 +1118,7 @@
NEED_TLS_PRF_SHA256=y
LIBS += -lcrypto
LIBS_p += -lcrypto
+LIBS_c += -lcrypto
ifdef CONFIG_TLS_ADD_DL
LIBS += -ldl
LIBS_p += -ldl
diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
index 82eb5ed..77df5be 100644
--- a/wpa_supplicant/config.c
+++ b/wpa_supplicant/config.c
@@ -3867,7 +3867,7 @@
e = &cred->excluded_ssid[i];
ret = os_snprintf(pos, end - pos, "%s%s",
i > 0 ? "\n" : "",
- wpa_ssid_txt(e->ssid, e->ssid_len));
+ wpa_ctrl_ssid_txt(e->ssid, e->ssid_len));
if (os_snprintf_error(end - pos, ret))
return buf;
pos += ret;
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index c3366c0..a8fbb47 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -2073,7 +2073,7 @@
_ssid = ssid_buf;
}
ret = os_snprintf(pos, end - pos, "ssid=%s\nid=%d\n",
- wpa_ssid_txt(_ssid, ssid_len),
+ wpa_ctrl_ssid_txt(_ssid, ssid_len),
ssid->id);
if (os_snprintf_error(end - pos, ret))
return pos - buf;
@@ -2350,8 +2350,8 @@
wpa_s->wpa_state,
MAC2STR(wpa_s->bssid),
wpa_s->current_ssid && wpa_s->current_ssid->ssid ?
- wpa_ssid_txt(wpa_s->current_ssid->ssid,
- wpa_s->current_ssid->ssid_len) : "");
+ wpa_ctrl_ssid_txt(wpa_s->current_ssid->ssid,
+ wpa_s->current_ssid->ssid_len) : "");
if (wpa_s->wpa_state == WPA_COMPLETED) {
struct wpa_ssid *ssid = wpa_s->current_ssid;
wpa_msg_ctrl(wpa_s, MSG_INFO, WPA_EVENT_CONNECTED
@@ -2533,7 +2533,7 @@
prev = pos;
ret = os_snprintf(pos, end - pos, "%d\t%s",
ssid->id,
- wpa_ssid_txt(ssid->ssid, ssid->ssid_len));
+ wpa_ctrl_ssid_txt(ssid->ssid, ssid->ssid_len));
if (os_snprintf_error(end - pos, ret))
return prev - buf;
pos += ret;
@@ -2949,7 +2949,7 @@
}
ret = os_snprintf(pos, end - pos, "\t%s",
- wpa_ssid_txt(bss->ssid, bss->ssid_len));
+ wpa_ctrl_ssid_txt(bss->ssid, bss->ssid_len));
if (os_snprintf_error(end - pos, ret))
return -1;
pos += ret;
@@ -4842,7 +4842,7 @@
if (mask & WPA_BSS_MASK_SSID) {
ret = os_snprintf(pos, end - pos, "ssid=%s\n",
- wpa_ssid_txt(bss->ssid, bss->ssid_len));
+ wpa_ctrl_ssid_txt(bss->ssid, bss->ssid_len));
if (os_snprintf_error(end - pos, ret))
return 0;
pos += ret;
diff --git a/wpa_supplicant/dpp_supplicant.c b/wpa_supplicant/dpp_supplicant.c
index 1f65658..87babd3 100644
--- a/wpa_supplicant/dpp_supplicant.c
+++ b/wpa_supplicant/dpp_supplicant.c
@@ -950,9 +950,12 @@
struct dpp_authentication *auth)
{
wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_CONF_RECEIVED);
- if (auth->ssid_len)
- wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_CONFOBJ_SSID "%s",
- wpa_ssid_txt(auth->ssid, auth->ssid_len));
+ if (auth->ssid_len) {
+ wpa_printf(wpa_s, MSG_INFO, DPP_EVENT_CONFOBJ_SSID "%s",
+ wpa_ssid_txt(auth->ssid, auth->ssid_len));
+ wpa_msg_ctrl(wpa_s, MSG_INFO, DPP_EVENT_CONFOBJ_SSID "%s",
+ wpa_ctrl_ssid_txt(auth->ssid, auth->ssid_len));
+ }
if (auth->connector) {
/* TODO: Save the Connector and consider using a command
* to fetch the value instead of sending an event with
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 71f9281..60becbd 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -188,9 +188,12 @@
drv_ssid_len) == 0)
return 0; /* current profile still in use */
- wpa_msg(wpa_s, MSG_DEBUG,
- "Driver-initiated BSS selection changed the SSID to %s",
- wpa_ssid_txt(drv_ssid, drv_ssid_len));
+ wpa_printf(wpa_s, MSG_DEBUG,
+ "Driver-initiated BSS selection changed the SSID to %s",
+ wpa_ssid_txt(drv_ssid, drv_ssid_len));
+ wpa_msg_ctrl(wpa_s, MSG_DEBUG,
+ "Driver-initiated BSS selection changed the SSID to %s",
+ wpa_ctrl_ssid_txt(drv_ssid, drv_ssid_len));
/* continue selecting a new network profile */
}
@@ -1598,10 +1601,14 @@
if (ssid->mode == WPAS_MODE_IBSS &&
!(ssid->key_mgmt & (WPA_KEY_MGMT_NONE |
WPA_KEY_MGMT_WPA_NONE))) {
- wpa_msg(wpa_s, MSG_INFO,
- "IBSS RSN not supported in the build - cannot use the profile for SSID '%s'",
- wpa_ssid_txt(ssid->ssid,
- ssid->ssid_len));
+ wpa_printf(wpa_s, MSG_INFO,
+ "IBSS RSN not supported in the build - cannot use the profile for SSID '%s'",
+ wpa_ssid_txt(ssid->ssid,
+ ssid->ssid_len));
+ wpa_msg_ctrl(wpa_s, MSG_INFO,
+ "IBSS RSN not supported in the build - cannot use the profile for SSID '%s'",
+ wpa_ctrl_ssid_txt(ssid->ssid,
+ ssid->ssid_len));
continue;
}
#endif /* !CONFIG_IBSS_RSN */
diff --git a/wpa_supplicant/mesh.c b/wpa_supplicant/mesh.c
index 7354c1b..210e02d 100644
--- a/wpa_supplicant/mesh.c
+++ b/wpa_supplicant/mesh.c
@@ -224,8 +224,10 @@
params->conf.flags |= WPA_DRIVER_MESH_CONF_FLAG_HT_OP_MODE;
params->conf.ht_opmode = ifmsh->bss[0]->iface->ht_op_mode;
- wpa_msg(wpa_s, MSG_INFO, "joining mesh %s",
- wpa_ssid_txt(ssid->ssid, ssid->ssid_len));
+ wpa_printf(wpa_s, MSG_INFO, "joining mesh %s",
+ wpa_ssid_txt(ssid->ssid, ssid->ssid_len));
+ wpa_msg_ctrl(wpa_s, MSG_INFO, "joining mesh %s",
+ wpa_ctrl_ssid_txt(ssid->ssid, ssid->ssid_len));
ret = wpa_drv_join_mesh(wpa_s, params);
if (ret)
wpa_msg(wpa_s, MSG_ERROR, "mesh join error=%d", ret);
diff --git a/wpa_supplicant/notify.c b/wpa_supplicant/notify.c
index e41d7c4..9d11bab 100644
--- a/wpa_supplicant/notify.c
+++ b/wpa_supplicant/notify.c
@@ -115,8 +115,8 @@
new_state,
MAC2STR(wpa_s->bssid),
wpa_s->current_ssid && wpa_s->current_ssid->ssid ?
- wpa_ssid_txt(wpa_s->current_ssid->ssid,
- wpa_s->current_ssid->ssid_len) : "");
+ wpa_ctrl_ssid_txt(wpa_s->current_ssid->ssid,
+ wpa_s->current_ssid->ssid_len) : "");
#endif /* ANDROID */
}
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index 55b3b08..8d358ff 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -1274,7 +1274,7 @@
psk_txt[0] = '\0';
if (ssid)
- ssid_txt = wpa_ssid_txt(ssid->ssid, ssid->ssid_len);
+ ssid_txt = wpa_ctrl_ssid_txt(ssid->ssid, ssid->ssid_len);
else
ssid_txt = "";
@@ -1298,7 +1298,8 @@
persistent ? " [PERSISTENT]" : "", extra);
wpa_printf(MSG_INFO, P2P_EVENT_GROUP_STARTED
"%s %s ssid=\"%s\" freq=%d go_dev_addr=" MACSTR "%s%s",
- wpa_s->ifname, go ? "GO" : "client", ssid_txt, freq,
+ wpa_s->ifname, go ? "GO" : "client",
+ ssid ? wpa_ssid_txt(ssid->ssid, ssid->ssid_len) : "", freq,
MAC2STR(go_dev_addr), persistent ? " [PERSISTENT]" : "",
extra);
}
diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index eefb9fe..8381825 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -757,9 +757,12 @@
wpa_supplicant_cancel_sched_scan(wpa_s);
wpa_supplicant_cancel_scan(wpa_s);
- wpa_msg(wpa_s, MSG_INFO, "SME: Trying to authenticate with " MACSTR
- " (SSID='%s' freq=%d MHz)", MAC2STR(params.bssid),
+ wpa_printf(wpa_s, MSG_INFO, "SME: Trying to authenticate with " MACSTR
+ " (SSID='%s' freq=%d MHz)", MAC2STR(params.bssid),
wpa_ssid_txt(params.ssid, params.ssid_len), params.freq);
+ wpa_msg_ctrl(wpa_s, MSG_INFO, "SME: Trying to authenticate with " MACSTR
+ " (SSID='%s' freq=%d MHz)", MAC2STR(params.bssid),
+ wpa_ctrl_ssid_txt(params.ssid, params.ssid_len), params.freq);
eapol_sm_notify_portValid(wpa_s->eapol, FALSE);
wpa_clear_keys(wpa_s, bss->bssid);
@@ -1758,10 +1761,14 @@
if (wpa_s->sme.prev_bssid_set)
params.prev_bssid = wpa_s->sme.prev_bssid;
- wpa_msg(wpa_s, MSG_INFO, "Trying to associate with " MACSTR
- " (SSID='%s' freq=%d MHz)", MAC2STR(params.bssid),
- params.ssid ? wpa_ssid_txt(params.ssid, params.ssid_len) : "",
- params.freq.freq);
+ wpa_printf(wpa_s, MSG_INFO, "Trying to associate with " MACSTR
+ " (SSID='%s' freq=%d MHz)", MAC2STR(params.bssid),
+ params.ssid ? wpa_ssid_txt(params.ssid, params.ssid_len) : "",
+ params.freq.freq);
+ wpa_msg_ctrl(wpa_s, MSG_INFO, "Trying to associate with " MACSTR
+ " (SSID='%s' freq=%d MHz)", MAC2STR(params.bssid),
+ params.ssid ? wpa_ctrl_ssid_txt(params.ssid, params.ssid_len) : "",
+ params.freq.freq);
wpa_supplicant_set_state(wpa_s, WPA_ASSOCIATING);
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index c208713..f051116 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -2047,9 +2047,12 @@
return;
}
wpa_s->current_bss = bss;
- wpa_msg(wpa_s, MSG_INFO, MESH_GROUP_STARTED "ssid=\"%s\" id=%d",
- wpa_ssid_txt(ssid->ssid, ssid->ssid_len),
- ssid->id);
+ wpa_printf(wpa_s, MSG_INFO, MESH_GROUP_STARTED "ssid=\"%s\" id=%d",
+ wpa_ssid_txt(ssid->ssid, ssid->ssid_len),
+ ssid->id);
+ wpa_msg_ctrl(wpa_s, MSG_INFO, MESH_GROUP_STARTED "ssid=\"%s\" id=%d",
+ wpa_ctrl_ssid_txt(ssid->ssid, ssid->ssid_len),
+ ssid->id);
wpas_notify_mesh_group_started(wpa_s, ssid);
#else /* CONFIG_MESH */
wpa_msg(wpa_s, MSG_ERROR,
@@ -3081,9 +3084,12 @@
#ifdef CONFIG_IEEE80211R
const u8 *ie, *md = NULL;
#endif /* CONFIG_IEEE80211R */
- wpa_msg(wpa_s, MSG_INFO, "Trying to associate with " MACSTR
- " (SSID='%s' freq=%d MHz)", MAC2STR(bss->bssid),
- wpa_ssid_txt(bss->ssid, bss->ssid_len), bss->freq);
+ wpa_printf(wpa_s, MSG_INFO, "Trying to associate with " MACSTR
+ " (SSID='%s' freq=%d MHz)", MAC2STR(bss->bssid),
+ wpa_ssid_txt(bss->ssid, bss->ssid_len), bss->freq);
+ wpa_msg_ctrl(wpa_s, MSG_INFO, "Trying to associate with " MACSTR
+ " (SSID='%s' freq=%d MHz)", MAC2STR(bss->bssid),
+ wpa_ctrl_ssid_txt(bss->ssid, bss->ssid_len), bss->freq);
bssid_changed = !is_zero_ether_addr(wpa_s->bssid);
os_memset(wpa_s->bssid, 0, ETH_ALEN);
os_memcpy(wpa_s->pending_bssid, bss->bssid, ETH_ALEN);
@@ -3112,8 +3118,10 @@
return;
#endif /* CONFIG_WPS */
} else {
- wpa_msg(wpa_s, MSG_INFO, "Trying to associate with SSID '%s'",
- wpa_ssid_txt(ssid->ssid, ssid->ssid_len));
+ wpa_printf(wpa_s, MSG_INFO, "Trying to associate with SSID '%s'",
+ wpa_ssid_txt(ssid->ssid, ssid->ssid_len));
+ wpa_msg_ctrl(wpa_s, MSG_INFO, "Trying to associate with SSID '%s'",
+ wpa_ctrl_ssid_txt(ssid->ssid, ssid->ssid_len));
if (bss)
os_memcpy(wpa_s->pending_bssid, bss->bssid, ETH_ALEN);
else
@@ -7147,10 +7155,14 @@
ssid->disabled_until.sec = now.sec + dur;
- wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_TEMP_DISABLED
- "id=%d ssid=\"%s\" auth_failures=%u duration=%d reason=%s",
- ssid->id, wpa_ssid_txt(ssid->ssid, ssid->ssid_len),
- ssid->auth_failures, dur, reason);
+ wpa_printf(wpa_s, MSG_INFO, WPA_EVENT_TEMP_DISABLED
+ "id=%d ssid=\"%s\" auth_failures=%u duration=%d reason=%s",
+ ssid->id, wpa_ssid_txt(ssid->ssid, ssid->ssid_len),
+ ssid->auth_failures, dur, reason);
+ wpa_msg_ctrl(wpa_s, MSG_INFO, WPA_EVENT_TEMP_DISABLED
+ "id=%d ssid=\"%s\" auth_failures=%u duration=%d reason=%s",
+ ssid->id, wpa_ctrl_ssid_txt(ssid->ssid, ssid->ssid_len),
+ ssid->auth_failures, dur, reason);
}
@@ -7161,9 +7173,12 @@
return;
if (ssid->disabled_until.sec) {
- wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_REENABLED
- "id=%d ssid=\"%s\"",
- ssid->id, wpa_ssid_txt(ssid->ssid, ssid->ssid_len));
+ wpa_printf(wpa_s, MSG_INFO, WPA_EVENT_REENABLED
+ "id=%d ssid=\"%s\"",
+ ssid->id, wpa_ssid_txt(ssid->ssid, ssid->ssid_len));
+ wpa_msg_ctrl(wpa_s, MSG_INFO, WPA_EVENT_REENABLED
+ "id=%d ssid=\"%s\"",
+ ssid->id, wpa_ctrl_ssid_txt(ssid->ssid, ssid->ssid_len));
}
ssid->disabled_until.sec = 0;
ssid->disabled_until.usec = 0;
diff --git a/wpa_supplicant/wps_supplicant.c b/wpa_supplicant/wps_supplicant.c
index 58eb1cb..5329e7c 100644
--- a/wpa_supplicant/wps_supplicant.c
+++ b/wpa_supplicant/wps_supplicant.c
@@ -822,7 +822,7 @@
wpa_msg_ctrl(wpa_s, MSG_INFO, WPS_EVENT_ER_AP_SETTINGS
"uuid=%s ssid=%s auth_type=0x%04x encr_type=0x%04x "
"key=%s",
- uuid_str, wpa_ssid_txt(cred->ssid, cred->ssid_len),
+ uuid_str, wpa_ctrl_ssid_txt(cred->ssid, cred->ssid_len),
cred->auth_type, cred->encr_type, key_str);
}