Message ID | CAGCGobCP43wb9f+U9D6S4TZj1Vb1W5iUkHZaks4siCP2Bqegpw@mail.gmail.com |
---|---|
State | Rejected |
Headers | show |
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 --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) {