diff --git a/wlantest/Makefile b/wlantest/Makefile index 7104f4f58..e6c3123ac 100644 --- a/wlantest/Makefile +++ b/wlantest/Makefile @@ -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 diff --git a/wlantest/bss.c b/wlantest/bss.c index 04afe2b29..298a902c7 100644 --- a/wlantest/bss.c +++ b/wlantest/bss.c @@ -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 " : ""); } diff --git a/wlantest/ctrl.c b/wlantest/ctrl.c index 7de0a8aff..587a0d3e1 100644 --- a/wlantest/ctrl.c +++ b/wlantest/ctrl.c @@ -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 ? "" : " "); } diff --git a/wlantest/sta.c b/wlantest/sta.c index 1e53532a0..3e5ff51b6 100644 --- a/wlantest/sta.c +++ b/wlantest/sta.c @@ -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 " : ""); }