mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
Redirect more frames with ext_mgmt_frame_handling=1
This allows Action frames from not-associated stations to be processed by external test tools. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
7738163951
commit
5f7e1c06cd
@ -678,6 +678,20 @@ static int hostapd_mgmt_rx(struct hostapd_data *hapd, struct rx_mgmt *rx_mgmt)
|
||||
struct hostapd_frame_info fi;
|
||||
int ret;
|
||||
|
||||
#ifdef CONFIG_TESTING_OPTIONS
|
||||
if (hapd->ext_mgmt_frame_handling) {
|
||||
size_t hex_len = 2 * rx_mgmt->frame_len + 1;
|
||||
char *hex = os_malloc(hex_len);
|
||||
if (hex) {
|
||||
wpa_snprintf_hex(hex, hex_len, rx_mgmt->frame,
|
||||
rx_mgmt->frame_len);
|
||||
wpa_msg(hapd->msg_ctx, MSG_INFO, "MGMT-RX %s", hex);
|
||||
os_free(hex);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
#endif /* CONFIG_TESTING_OPTIONS */
|
||||
|
||||
hdr = (const struct ieee80211_hdr *) rx_mgmt->frame;
|
||||
bssid = get_hdr_bssid(hdr, rx_mgmt->frame_len);
|
||||
if (bssid == NULL)
|
||||
|
@ -1738,19 +1738,6 @@ int ieee802_11_mgmt(struct hostapd_data *hapd, const u8 *buf, size_t len,
|
||||
u16 fc, stype;
|
||||
int ret = 0;
|
||||
|
||||
#ifdef CONFIG_TESTING_OPTIONS
|
||||
if (hapd->ext_mgmt_frame_handling) {
|
||||
size_t hex_len = 2 * len + 1;
|
||||
char *hex = os_malloc(hex_len);
|
||||
if (hex) {
|
||||
wpa_snprintf_hex(hex, hex_len, buf, len);
|
||||
wpa_msg(hapd->msg_ctx, MSG_INFO, "MGMT-RX %s", hex);
|
||||
os_free(hex);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
#endif /* CONFIG_TESTING_OPTIONS */
|
||||
|
||||
if (len < 24)
|
||||
return 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user