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:
Mathy Vanhoef 2018-08-06 15:46:25 -04:00 committed by Jouni Malinen
parent 55c12f5d37
commit dce9621880
4 changed files with 16 additions and 4 deletions

View file

@ -47,6 +47,7 @@ OBJS_lib += ../src/crypto/libcrypto.a
CFLAGS += -DCONFIG_PEERKEY
CFLAGS += -DCONFIG_IEEE80211W
CFLAGS += -DCONFIG_OCV
CFLAGS += -DCONFIG_IEEE80211R
CFLAGS += -DCONFIG_HS20
CFLAGS += -DCONFIG_DEBUG_FILE

View 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"
"mgmt_group_cipher=%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),
bss->proto == 0 ? "OPEN " : "",
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_MFPC ? "MFPC " : "",
bss->rsn_capab & WPA_CAPABILITY_PEERKEY_ENABLED ?
"PEERKEY " : "");
"PEERKEY " : "",
bss->rsn_capab & WPA_CAPABILITY_OCVC ? "OCVC " : "");
}

View file

@ -982,6 +982,9 @@ static void info_print_rsn_capab(char *buf, size_t len, int capab)
if (capab & WPA_CAPABILITY_PEERKEY_ENABLED)
pos += os_snprintf(pos, end - pos, "%sPEERKEY",
pos == buf ? "" : " ");
if (capab & WPA_CAPABILITY_OCVC)
pos += os_snprintf(pos, end - pos, "%sOCVC",
pos == buf ? "" : " ");
}

View file

@ -168,13 +168,19 @@ void sta_update_assoc(struct wlantest_sta *sta, struct ieee802_11_elems *elems)
"without MFP to BSS " MACSTR " that advertises "
"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:
wpa_printf(MSG_INFO, "STA " MACSTR
" proto=%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"
"rsn_capab=%s%s%s%s%s",
"rsn_capab=%s%s%s%s%s%s",
MAC2STR(sta->addr),
sta->proto == 0 ? "OPEN " : "",
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_MFPC ? "MFPC " : "",
sta->rsn_capab & WPA_CAPABILITY_PEERKEY_ENABLED ?
"PEERKEY " : "");
"PEERKEY " : "",
sta->rsn_capab & WPA_CAPABILITY_OCVC ? "OCVC " : "");
}