mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
OCV: Add wlantest support for indicating OCV
Add wlantest parsing of the OCV RSN cpability flag. Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
This commit is contained in:
parent
55c12f5d37
commit
dce9621880
@ -47,6 +47,7 @@ OBJS_lib += ../src/crypto/libcrypto.a
|
|||||||
|
|
||||||
CFLAGS += -DCONFIG_PEERKEY
|
CFLAGS += -DCONFIG_PEERKEY
|
||||||
CFLAGS += -DCONFIG_IEEE80211W
|
CFLAGS += -DCONFIG_IEEE80211W
|
||||||
|
CFLAGS += -DCONFIG_OCV
|
||||||
CFLAGS += -DCONFIG_IEEE80211R
|
CFLAGS += -DCONFIG_IEEE80211R
|
||||||
CFLAGS += -DCONFIG_HS20
|
CFLAGS += -DCONFIG_HS20
|
||||||
CFLAGS += -DCONFIG_DEBUG_FILE
|
CFLAGS += -DCONFIG_DEBUG_FILE
|
||||||
|
@ -283,7 +283,7 @@ void bss_update(struct wlantest *wt, struct wlantest_bss *bss,
|
|||||||
"group=%s%s%s%s%s%s%s%s%s"
|
"group=%s%s%s%s%s%s%s%s%s"
|
||||||
"mgmt_group_cipher=%s%s%s%s%s"
|
"mgmt_group_cipher=%s%s%s%s%s"
|
||||||
"key_mgmt=%s%s%s%s%s%s%s%s%s"
|
"key_mgmt=%s%s%s%s%s%s%s%s%s"
|
||||||
"rsn_capab=%s%s%s%s%s",
|
"rsn_capab=%s%s%s%s%s%s",
|
||||||
MAC2STR(bss->bssid),
|
MAC2STR(bss->bssid),
|
||||||
bss->proto == 0 ? "OPEN " : "",
|
bss->proto == 0 ? "OPEN " : "",
|
||||||
bss->proto & WPA_PROTO_WPA ? "WPA " : "",
|
bss->proto & WPA_PROTO_WPA ? "WPA " : "",
|
||||||
@ -333,7 +333,8 @@ void bss_update(struct wlantest *wt, struct wlantest_bss *bss,
|
|||||||
bss->rsn_capab & WPA_CAPABILITY_MFPR ? "MFPR " : "",
|
bss->rsn_capab & WPA_CAPABILITY_MFPR ? "MFPR " : "",
|
||||||
bss->rsn_capab & WPA_CAPABILITY_MFPC ? "MFPC " : "",
|
bss->rsn_capab & WPA_CAPABILITY_MFPC ? "MFPC " : "",
|
||||||
bss->rsn_capab & WPA_CAPABILITY_PEERKEY_ENABLED ?
|
bss->rsn_capab & WPA_CAPABILITY_PEERKEY_ENABLED ?
|
||||||
"PEERKEY " : "");
|
"PEERKEY " : "",
|
||||||
|
bss->rsn_capab & WPA_CAPABILITY_OCVC ? "OCVC " : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -982,6 +982,9 @@ static void info_print_rsn_capab(char *buf, size_t len, int capab)
|
|||||||
if (capab & WPA_CAPABILITY_PEERKEY_ENABLED)
|
if (capab & WPA_CAPABILITY_PEERKEY_ENABLED)
|
||||||
pos += os_snprintf(pos, end - pos, "%sPEERKEY",
|
pos += os_snprintf(pos, end - pos, "%sPEERKEY",
|
||||||
pos == buf ? "" : " ");
|
pos == buf ? "" : " ");
|
||||||
|
if (capab & WPA_CAPABILITY_OCVC)
|
||||||
|
pos += os_snprintf(pos, end - pos, "%sOCVC",
|
||||||
|
pos == buf ? "" : " ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -168,13 +168,19 @@ void sta_update_assoc(struct wlantest_sta *sta, struct ieee802_11_elems *elems)
|
|||||||
"without MFP to BSS " MACSTR " that advertises "
|
"without MFP to BSS " MACSTR " that advertises "
|
||||||
"MFPR", MAC2STR(sta->addr), MAC2STR(bss->bssid));
|
"MFPR", MAC2STR(sta->addr), MAC2STR(bss->bssid));
|
||||||
}
|
}
|
||||||
|
if ((sta->rsn_capab & WPA_CAPABILITY_OCVC) &&
|
||||||
|
!(sta->rsn_capab & WPA_CAPABILITY_MFPC)) {
|
||||||
|
wpa_printf(MSG_INFO, "STA " MACSTR " tries to associate "
|
||||||
|
"without MFP to BSS " MACSTR " while supporting "
|
||||||
|
"OCV", MAC2STR(sta->addr), MAC2STR(bss->bssid));
|
||||||
|
}
|
||||||
|
|
||||||
skip_rsn_wpa:
|
skip_rsn_wpa:
|
||||||
wpa_printf(MSG_INFO, "STA " MACSTR
|
wpa_printf(MSG_INFO, "STA " MACSTR
|
||||||
" proto=%s%s%s%s"
|
" proto=%s%s%s%s"
|
||||||
"pairwise=%s%s%s%s%s%s%s"
|
"pairwise=%s%s%s%s%s%s%s"
|
||||||
"key_mgmt=%s%s%s%s%s%s%s%s%s%s%s"
|
"key_mgmt=%s%s%s%s%s%s%s%s%s%s%s"
|
||||||
"rsn_capab=%s%s%s%s%s",
|
"rsn_capab=%s%s%s%s%s%s",
|
||||||
MAC2STR(sta->addr),
|
MAC2STR(sta->addr),
|
||||||
sta->proto == 0 ? "OPEN " : "",
|
sta->proto == 0 ? "OPEN " : "",
|
||||||
sta->proto & WPA_PROTO_WPA ? "WPA " : "",
|
sta->proto & WPA_PROTO_WPA ? "WPA " : "",
|
||||||
@ -210,5 +216,6 @@ skip_rsn_wpa:
|
|||||||
sta->rsn_capab & WPA_CAPABILITY_MFPR ? "MFPR " : "",
|
sta->rsn_capab & WPA_CAPABILITY_MFPR ? "MFPR " : "",
|
||||||
sta->rsn_capab & WPA_CAPABILITY_MFPC ? "MFPC " : "",
|
sta->rsn_capab & WPA_CAPABILITY_MFPC ? "MFPC " : "",
|
||||||
sta->rsn_capab & WPA_CAPABILITY_PEERKEY_ENABLED ?
|
sta->rsn_capab & WPA_CAPABILITY_PEERKEY_ENABLED ?
|
||||||
"PEERKEY " : "");
|
"PEERKEY " : "",
|
||||||
|
sta->rsn_capab & WPA_CAPABILITY_OCVC ? "OCVC " : "");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user