]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
WPA: Print pairwise EAPOL-Key flag as a bool
authorJohannes Berg <johannes.berg@intel.com>
Sat, 4 May 2013 08:48:57 +0000 (11:48 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 4 May 2013 08:48:57 +0000 (11:48 +0300)
Since "pairwise" is defined as an integer, the current assignment leads
to it having the value 0 or 8, which is a bit strange in debug output:

WPA: Send EAPOL(version=2 secure=1 mic=1 ack=1 install=1 pairwise=8
kde_len=46 keyidx=2 encr=1)

Use !!(...) to normalize it to 0 or 1.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>

src/ap/wpa_auth.c

index 5a0bec8c55108602602668d82ff03dfa64cf2317..18ae86c8bdc3bdf2bab22259327eb99ad416beeb 100644 (file)
@@ -1232,7 +1232,7 @@ void __wpa_send_eapol(struct wpa_authenticator *wpa_auth,
        else
                version = WPA_KEY_INFO_TYPE_HMAC_MD5_RC4;
 
-       pairwise = key_info & WPA_KEY_INFO_KEY_TYPE;
+       pairwise = !!(key_info & WPA_KEY_INFO_KEY_TYPE);
 
        wpa_printf(MSG_DEBUG, "WPA: Send EAPOL(version=%d secure=%d mic=%d "
                   "ack=%d install=%d pairwise=%d kde_len=%lu keyidx=%d "