diff mbox

Print out the commands received by the ctrl_interace

Message ID CAGCGobCP43wb9f+U9D6S4TZj1Vb1W5iUkHZaks4siCP2Bqegpw@mail.gmail.com
State Rejected
Headers show

Commit Message

Jithu Jance April 30, 2012, 6:08 a.m. UTC
[PATCH] Add DEBUG level print for commands received by
 the ctrl_interface.

Signed-hostap: Jithu Jance <jithu@broadcom.com>
---
 wpa_supplicant/ctrl_iface.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

 		wpa_hexdump_ascii_key(MSG_DEBUG, "RX ctrl_iface",

Comments

Jouni Malinen June 10, 2012, 5:29 p.m. UTC | #1
On Mon, Apr 30, 2012 at 11:38:45AM +0530, Jithu Jance wrote:
> [PATCH] Add DEBUG level print for commands received by
>  the ctrl_interface.

> diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
> @@ -3741,6 +3741,8 @@ char * wpa_supplicant_ctrl_iface_process(struct
> +	wpa_printf(MSG_DEBUG, "CTRL_IFACE: %s (%s)", buf, wpa_s->ifname);
> +
>  	if (os_strncmp(buf, WPA_CTRL_RSP, os_strlen(WPA_CTRL_RSP)) == 0 ||
>  	    os_strncmp(buf, "SET_NETWORK ", 12) == 0) {
>  		wpa_hexdump_ascii_key(MSG_DEBUG, "RX ctrl_iface",

The command is already printed out here here with wpa_hexdump_ascii*.
Since the control interface commands can include passwords or other
private information, their contents cannot be printed out with
wpa_printf() unconditionally, i.e., those two different branch here
needs to be followed to figure out whether the information can be
included in the debug log without -K on the command line.
diff mbox

Patch

diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 538f8df..4e88ce3 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -3741,6 +3741,8 @@  char * wpa_supplicant_ctrl_iface_process(struct
wpa_supplicant *wpa_s,
 	int ctrl_rsp = 0;
 	int reply_len;

+	wpa_printf(MSG_DEBUG, "CTRL_IFACE: %s (%s)", buf, wpa_s->ifname);
+
 	if (os_strncmp(buf, WPA_CTRL_RSP, os_strlen(WPA_CTRL_RSP)) == 0 ||
 	    os_strncmp(buf, "SET_NETWORK ", 12) == 0) {