From dc87541e1e97b57438faaea136ac7d1fb8336a19 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 29 Mar 2014 09:50:51 +0200 Subject: [PATCH] Clean up debug print for PSK file search p2p_dev_addr was not NULL, so the all zeros case was printed as well. Clean this up by printing p2p_dev_addr in debug prints only if it is a real P2P Device Address. Signed-off-by: Jouni Malinen --- src/ap/ap_config.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c index 5a8e67e99..0a143d394 100644 --- a/src/ap/ap_config.c +++ b/src/ap/ap_config.c @@ -651,12 +651,11 @@ const u8 * hostapd_get_psk(const struct hostapd_bss_config *conf, struct hostapd_wpa_psk *psk; int next_ok = prev_psk == NULL; - if (p2p_dev_addr) { + if (p2p_dev_addr && !is_zero_ether_addr(p2p_dev_addr)) { wpa_printf(MSG_DEBUG, "Searching a PSK for " MACSTR " p2p_dev_addr=" MACSTR " prev_psk=%p", MAC2STR(addr), MAC2STR(p2p_dev_addr), prev_psk); - if (!is_zero_ether_addr(p2p_dev_addr)) - addr = NULL; /* Use P2P Device Address for matching */ + addr = NULL; /* Use P2P Device Address for matching */ } else { wpa_printf(MSG_DEBUG, "Searching a PSK for " MACSTR " prev_psk=%p",