From 749fa140ffae7c6f61b1aa4de18288bf3f9b13af Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 2 Mar 2014 15:35:11 +0200 Subject: [PATCH] Debug print trailing WPA/RSN IE bytes, if any This silences a never-used analyzer warning in addition to making the debug log entry somewhat more useful. Signed-off-by: Jouni Malinen --- src/common/wpa_common.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/common/wpa_common.c b/src/common/wpa_common.c index c9d0ccb7e..02ee508ae 100644 --- a/src/common/wpa_common.c +++ b/src/common/wpa_common.c @@ -558,8 +558,9 @@ int wpa_parse_wpa_ie_rsn(const u8 *rsn_ie, size_t rsn_ie_len, #endif /* CONFIG_IEEE80211W */ if (left > 0) { - wpa_printf(MSG_DEBUG, "%s: ie has %u trailing bytes - ignored", - __func__, left); + wpa_hexdump(MSG_DEBUG, + "wpa_parse_wpa_ie_rsn: ignore trailing bytes", + pos, left); } return 0; @@ -696,8 +697,9 @@ int wpa_parse_wpa_ie_wpa(const u8 *wpa_ie, size_t wpa_ie_len, } if (left > 0) { - wpa_printf(MSG_DEBUG, "%s: ie has %u trailing bytes - ignored", - __func__, left); + wpa_hexdump(MSG_DEBUG, + "wpa_parse_wpa_ie_wpa: ignore trailing bytes", + pos, left); } return 0;