aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2017-03-26 09:49:59 (GMT)
committerJouni Malinen <j@w1.fi>2017-03-26 18:13:21 (GMT)
commitdd4722df9bb45f8133adff637eee25670257d94c (patch)
tree1bd0d634e50ba4371bd5a3010f3ca2a333ed5f2e /wlantest
parenta5269dc209a417732fab6e8e36e5602a6f751662 (diff)
downloadhostap-dd4722df9bb45f8133adff637eee25670257d94c.zip
hostap-dd4722df9bb45f8133adff637eee25670257d94c.tar.gz
hostap-dd4722df9bb45f8133adff637eee25670257d94c.tar.bz2
wlantest: Fix pcapng writer to include decrypted EAPOL-Key Key Data
This was only written to pcapng files if both pcap and pcapng writing was requested. Fix this for the case where only a pcapng file is being written. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wlantest')
-rw-r--r--wlantest/rx_eapol.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/wlantest/rx_eapol.c b/wlantest/rx_eapol.c
index 27011cb..c4f5e8d 100644
--- a/wlantest/rx_eapol.c
+++ b/wlantest/rx_eapol.c
@@ -638,7 +638,7 @@ static void rx_data_eapol_key_3_of_4(struct wlantest *wt, const u8 *dst,
wpa_hexdump(MSG_DEBUG, "Decrypted EAPOL-Key Key Data",
decrypted, decrypted_len);
}
- if (wt->write_pcap_dumper && decrypted != key_data) {
+ if ((wt->write_pcap_dumper || wt->pcapng) && decrypted != key_data) {
/* Fill in a dummy Data frame header */
u8 buf[24 + 8 + sizeof(*eapol) + sizeof(*hdr) + 64];
struct ieee80211_hdr *h;
@@ -841,7 +841,7 @@ static void rx_data_eapol_key_1_of_2(struct wlantest *wt, const u8 *dst,
}
wpa_hexdump(MSG_DEBUG, "Decrypted EAPOL-Key Key Data",
decrypted, decrypted_len);
- if (wt->write_pcap_dumper) {
+ if (wt->write_pcap_dumper || wt->pcapng) {
/* Fill in a dummy Data frame header */
u8 buf[24 + 8 + sizeof(*eapol) + sizeof(*hdr) + 64];
struct ieee80211_hdr *h;