mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
AP: Convert some wpa_printf to wpa_msg/dbg
This generates better log messages when running multiple interfaces in one process. Signed-off-by: Ben Greear <greearb@candelatech.com>
This commit is contained in:
parent
af22a9994b
commit
e04a163180
@ -173,9 +173,9 @@ static int p2p_manager_disconnect(struct hostapd_data *hapd, u16 stype,
|
|||||||
if (mgmt == NULL)
|
if (mgmt == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
wpa_printf(MSG_DEBUG, "P2P: Disconnect STA " MACSTR " with minor "
|
wpa_dbg(hapd->msg_ctx, MSG_DEBUG, "P2P: Disconnect STA " MACSTR
|
||||||
"reason code %u (stype=%u)",
|
" with minor reason code %u (stype=%u)",
|
||||||
MAC2STR(addr), minor_reason_code, stype);
|
MAC2STR(addr), minor_reason_code, stype);
|
||||||
|
|
||||||
mgmt->frame_control = IEEE80211_FC(WLAN_FC_TYPE_MGMT, stype);
|
mgmt->frame_control = IEEE80211_FC(WLAN_FC_TYPE_MGMT, stype);
|
||||||
os_memcpy(mgmt->da, addr, ETH_ALEN);
|
os_memcpy(mgmt->da, addr, ETH_ALEN);
|
||||||
@ -218,7 +218,8 @@ static int hostapd_ctrl_iface_deauthenticate(struct hostapd_data *hapd,
|
|||||||
struct sta_info *sta;
|
struct sta_info *sta;
|
||||||
const char *pos;
|
const char *pos;
|
||||||
|
|
||||||
wpa_printf(MSG_DEBUG, "CTRL_IFACE DEAUTHENTICATE %s", txtaddr);
|
wpa_dbg(hapd->msg_ctx, MSG_DEBUG, "CTRL_IFACE DEAUTHENTICATE %s",
|
||||||
|
txtaddr);
|
||||||
|
|
||||||
if (hwaddr_aton(txtaddr, addr))
|
if (hwaddr_aton(txtaddr, addr))
|
||||||
return -1;
|
return -1;
|
||||||
@ -274,7 +275,8 @@ static int hostapd_ctrl_iface_disassociate(struct hostapd_data *hapd,
|
|||||||
struct sta_info *sta;
|
struct sta_info *sta;
|
||||||
const char *pos;
|
const char *pos;
|
||||||
|
|
||||||
wpa_printf(MSG_DEBUG, "CTRL_IFACE DISASSOCIATE %s", txtaddr);
|
wpa_dbg(hapd->msg_ctx, MSG_DEBUG, "CTRL_IFACE DISASSOCIATE %s",
|
||||||
|
txtaddr);
|
||||||
|
|
||||||
if (hwaddr_aton(txtaddr, addr))
|
if (hwaddr_aton(txtaddr, addr))
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -347,12 +347,13 @@ static int hostapd_flush_old_stations(struct hostapd_data *hapd)
|
|||||||
if (hostapd_drv_none(hapd) || hapd->drv_priv == NULL)
|
if (hostapd_drv_none(hapd) || hapd->drv_priv == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
wpa_printf(MSG_DEBUG, "Flushing old station entries");
|
wpa_dbg(hapd->msg_ctx, MSG_DEBUG, "Flushing old station entries");
|
||||||
if (hostapd_flush(hapd)) {
|
if (hostapd_flush(hapd)) {
|
||||||
wpa_printf(MSG_WARNING, "Could not connect to kernel driver.");
|
wpa_msg(hapd->msg_ctx, MSG_WARNING, "Could not connect to "
|
||||||
|
"kernel driver");
|
||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
wpa_printf(MSG_DEBUG, "Deauthenticate all stations");
|
wpa_dbg(hapd->msg_ctx, MSG_DEBUG, "Deauthenticate all stations");
|
||||||
os_memset(addr, 0xff, ETH_ALEN);
|
os_memset(addr, 0xff, ETH_ALEN);
|
||||||
hostapd_drv_sta_deauth(hapd, addr, WLAN_REASON_PREV_AUTH_NOT_VALID);
|
hostapd_drv_sta_deauth(hapd, addr, WLAN_REASON_PREV_AUTH_NOT_VALID);
|
||||||
hostapd_free_stas(hapd);
|
hostapd_free_stas(hapd);
|
||||||
|
@ -2094,8 +2094,8 @@ static void ieee802_1x_finished(struct hostapd_data *hapd,
|
|||||||
* EAP-FAST with anonymous provisioning, may require another
|
* EAP-FAST with anonymous provisioning, may require another
|
||||||
* EAPOL authentication to be started to complete connection.
|
* EAPOL authentication to be started to complete connection.
|
||||||
*/
|
*/
|
||||||
wpa_printf(MSG_DEBUG, "IEEE 802.1X: Force disconnection after "
|
wpa_dbg(hapd->msg_ctx, MSG_DEBUG, "IEEE 802.1X: Force "
|
||||||
"EAP-Failure");
|
"disconnection after EAP-Failure");
|
||||||
/* Add a small sleep to increase likelihood of previously
|
/* Add a small sleep to increase likelihood of previously
|
||||||
* requested EAP-Failure TX getting out before this should the
|
* requested EAP-Failure TX getting out before this should the
|
||||||
* driver reorder operations.
|
* driver reorder operations.
|
||||||
|
Loading…
Reference in New Issue
Block a user