]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Add mgmt_group_cipher to wpa_supplicant STATUS command
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 3 Jul 2017 11:28:24 +0000 (14:28 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 3 Jul 2017 11:28:24 +0000 (14:28 +0300)
This can be used to check which management group cipher is used in an
association that uses PMF.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/common/wpa_common.c
src/rsn_supp/wpa.c

index 47b0d425bf22553da6d3eac12eeaefc3c5329027..2250190fd1f214e10e6d3e935fbc21086612244c 100644 (file)
@@ -1547,6 +1547,14 @@ const char * wpa_cipher_txt(int cipher)
                return "GCMP-256";
        case WPA_CIPHER_CCMP_256:
                return "CCMP-256";
+       case WPA_CIPHER_AES_128_CMAC:
+               return "BIP";
+       case WPA_CIPHER_BIP_GMAC_128:
+               return "BIP-GMAC-128";
+       case WPA_CIPHER_BIP_GMAC_256:
+               return "BIP-GMAC-256";
+       case WPA_CIPHER_BIP_CMAC_256:
+               return "BIP-CMAC-256";
        case WPA_CIPHER_GTK_NOT_USED:
                return "GTK_NOT_USED";
        default:
index 183823ff47a90722819aaf54ba61794ba9d24078..ab2302b8c1061dad1f1216eb36f2b6f72a4680da 100644 (file)
@@ -2858,9 +2858,12 @@ int wpa_sm_get_status(struct wpa_sm *sm, char *buf, size_t buflen,
                    >= 0 &&
                    rsn.capabilities & (WPA_CAPABILITY_MFPR |
                                        WPA_CAPABILITY_MFPC)) {
-                       ret = os_snprintf(pos, end - pos, "pmf=%d\n",
+                       ret = os_snprintf(pos, end - pos, "pmf=%d\n"
+                                         "mgmt_group_cipher=%s\n",
                                          (rsn.capabilities &
-                                          WPA_CAPABILITY_MFPR) ? 2 : 1);
+                                          WPA_CAPABILITY_MFPR) ? 2 : 1,
+                                         wpa_cipher_txt(
+                                                 sm->mgmt_group_cipher));
                        if (os_snprintf_error(end - pos, ret))
                                return pos - buf;
                        pos += ret;