Commit graph

125 commits

Author SHA1 Message Date
Jouni Malinen
add11058e2 wlantest: Fix couple of compiler warnings
Signed-hostap: Jouni Malinen <j@w1.fi>
2012-08-22 11:16:48 +03:00
Jouni Malinen
f9884c096a Convert os_zalloc() for an array to use os_calloc()
Signed-hostap: Jouni Malinen <j@w1.fi>
2012-08-13 20:44:21 +03:00
Janusz Dziedzic
2d2398a11f edit: Add support for setting prompt string
Signed-hostap: Janusz Dziedzic <janusz.dziedzic@tieto.com>
2012-08-05 20:46:34 +03:00
Jouni Malinen
c81defea87 wlantest: Update STA info based on WPA/RSN IE in EAPOL-Key 2/4
The WPA/RSN IE in EAPOL-Key 2/4 is more reliable than the one in
(Re)Association Request frame. Update the STA info base don the
EAPOL-Key frame so that the correct cipher information is used
even if the (Re)Association Request frame is missing or corrupted
in the capture.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2012-03-21 16:19:00 -07:00
Jouni Malinen
0f3d578efc Remove the GPL notification from files contributed by Jouni Malinen
Remove the GPL notification text from the files that were
initially contributed by myself.

Signed-hostap: Jouni Malinen <j@w1.fi>
2012-02-11 19:39:36 +02:00
Jouni Malinen
fd848ab9e3 wlantest: Store last received GTK for each STA
This allows info_sta command to be used to fetch the last received GTK
separately for each STA.

Signed-hostap: Jouni Malinen <j@w1.fi>
2011-12-22 16:59:25 +02:00
Jouni Malinen
3c56f0e275 wlantest: Fix EAPOL-Key Key Data decryption for rekey case
KEK from TPTK needs to be used instead of from PTK when processing
rekeying case similarly to what was already done with KCK.

Signed-hostap: Jouni Malinen <j@w1.fi>
2011-12-22 16:39:17 +02:00
Jouni Malinen
219fd441fd wlantest: Allow MSK/PMK list to be read from a text file
A text file with MSK/PMK entries (one key per line in hexdump format)
can be read into wlantest (-f<path to file>) to initialize list of
known PMKs.

Signed-hostap: Jouni Malinen <j@w1.fi>
2011-12-09 00:12:27 +02:00
Jouni Malinen
d0b251d2e8 wlantest: Fix handling of PTK rekeying
Use a temporary PTK buffer during 4-way handshake when rekeying PTK
so that the new EAPOL-Key frame MIC values are checked against the
new PTK and frames are decrypted using the old PTK. Take the new
PTK into use once msg 4/4 is processed and clear RSC counters at
that point (including moving of RSC update to avoid setting RSC
based on the msg 4/4).

In addition, add a workaround to handle supplicant implementations that
set Secure bit to one during PTK rekeying 4-way handshake in msg 2/4.
This was previously assumed to be msg 4/4, but the key data contents
can be used to figure out whether this is msg 2/4 even if the Secure
bit is set to one.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
2011-11-14 22:36:02 +02:00
Jouni Malinen
62f05ce9c5 wlantest: Add STA counters for disconnect reason 6/7 RX
These can be useful in tests involving association state mismatch
between the AP and the STA (i.e., STA assumes it is still associated
but the AP does not have association state). In such a case, the AP
would be sending out unprotected Deauthentication or Disassociation
frames with reason code 6 or 7 depending on what frame is triggering
this.
2011-10-26 00:06:06 +03:00
Jouni Malinen
6908d459e2 wlantest: Verify that comeback assoc resp includes correct type
The Timeout Interval element needs to use Association Comeback time
for the case when (Re)Association Response frame uses Status Code 30.
Verify this before incrementing the (re)assocresp_comeback counters.
2011-09-20 20:13:18 +03:00
Jouni Malinen
02b915f689 wlantest: Allow injection of unprotected frames to unknown BSS 2011-08-28 19:19:38 +03:00
Jouni Malinen
6ca4da6518 wlantest: Use source address of TDLS Setup Confirm failure for matching
This is needed to be able to find the correct TDLS entry for the
frame regardless of whether a FromDS or ToDS frame is being processed.
2011-03-14 21:35:40 +02:00
Jouni Malinen
39c147261e wlantest: Fix source address for FromDS frames 2011-03-14 21:35:14 +02:00
Jouni Malinen
9a994178f1 wlantest: Add command for adding WEP keys during run time 2011-01-28 13:33:21 +02:00
Jouni Malinen
dfaeda0492 Fix couple of compiler warnings about uninitialized variables 2011-01-26 21:29:28 +02:00
Jouni Malinen
4e062e35de wlantest: Handle missing fields in TDLS Setup Confirm error case 2011-01-24 20:51:28 +02:00
Jouni Malinen
2878cae7a7 wlantest: Handle missing fields in TDLS Setup Response error case 2011-01-24 18:16:26 +02:00
Jouni Malinen
5acf56f6a2 wlantest: Count TDLS Teardown messages 2011-01-24 17:00:28 +02:00
Jouni Malinen
9559a7f882 wlantest: Fix compiler warnings 2011-01-24 16:57:36 +02:00
Jouni Malinen
44a0486607 wlantest: Fix TDLS setup failure counting
Need to be able to handle TDLS Setup Response frame with LinkId IE
when non-zero status code is used. In addition, allow finding of a
TDLS entry based on real BSSID instead of the one used in the LinkId
to allow negative testing of different BSS.
2011-01-24 15:25:59 +02:00
Jouni Malinen
244c9303cb wlantest: Determine ping matches properly for direct link
Check ICMP echo request/response matches for both STAs to get proper
counter values for a ping from a one STA to another one using TDLS.
2011-01-24 14:50:51 +02:00
Jouni Malinen
719e7eb28d wlantest: Set direct links down on deauth/disassoc 2011-01-24 14:34:54 +02:00
Jouni Malinen
0d2e395d74 wlantest: Maintain only a single entry for an active direct link
The TDLS link itself is bidirectional, but there is explicit
initiator/responder roles. Remove the other direction of the link if it
exists when processing TDLS Setup Confirm to make sure that the link
counters are stored for the current TDLS entery.

This is also changing the control interface search for TDLS counters
to require initiator/responder addresses in the correct order instead
of matching entries regardless of the role.
2011-01-24 14:34:45 +02:00
Jouni Malinen
eb4923fdae wlantest: Add counters for TDLS setup frames 2011-01-24 14:03:03 +02:00
Jouni Malinen
8a1cf4be21 wlantest: Add TDLS entry on TDLS Setup Request
This will make the TDLS counters available even if setup fails.
2011-01-19 14:00:14 +02:00
Jouni Malinen
2caf69247b wlantest: Check WPA/RSN IE match between AssocReq and Beacon
Note unexpected WPA/RSN IE in AssocReq and ignore them if the last
Beacon/ProbeResp from the AP is not advertising support for
WPA/RSN.
2011-01-17 19:52:35 +02:00
Jouni Malinen
2e479416d1 wlantest: Add support for decrypting WEP frames 2011-01-14 17:43:17 +02:00
Jouni Malinen
3558c41ee7 wlantest: Add more details for CCMP MIC failures 2011-01-14 16:32:59 +02:00
Jouni Malinen
ef44a08bea wlantest: Fix masking of CCMP AAD QC field 2011-01-14 16:32:14 +02:00
Jouni Malinen
0a9ddd92cd wlantest: Add STA counter prot_data_tx 2011-01-07 17:09:09 +02:00
Jouni Malinen
e7ba4e2c74 wlantest: Add counters for AP deauth/disassoc while asleep/awake
These can be used to check whether the STA is in power save mode
and because of that, is not seeing disconnection notifications.
2011-01-07 16:52:56 +02:00
Jouni Malinen
7e7a57ae3f wlantest: Track station PS state 2011-01-07 15:54:58 +02:00
Jouni Malinen
01b397dd94 wlantest: Add more details for replay debug messages
These make it easier to find the frame in question when looking at
the capture in Wireshark.
2011-01-07 14:17:08 +02:00
Jouni Malinen
62a0255c1f wlantest: Skip frames inserted by wlantest when reading pcap file
This makes debug output clearer when re-reading a file that has
previously been processed and decrypted by wlantest.
2011-01-05 10:41:51 +02:00
Jouni Malinen
fb8f5fc6fd wlantest: Count number of STA ACK'ed Deauth/Disassoc frames 2011-01-03 19:28:40 +02:00
Jouni Malinen
1da4da6f76 wlantest: Add ping_ok_first_assoc STA counter
This can be used to verify whether ping goes through between
clearing of the STA counters and the first (re)association.
2011-01-03 16:54:14 +02:00
Jouni Malinen
a8401116e1 wlantest: Add more debug output for frame injection failures 2010-12-21 12:48:53 +02:00
Jouni Malinen
880a97dc5d wlantest: Fix management frame injection
The TDLS special case was supposed to apply to only Data frames.
2010-12-21 12:48:03 +02:00
Jouni Malinen
71a7e936e1 wlantest: Fix buffer read overflow on CCMP encryption
The encryption code may write a full AES block to the end of the
buffer, so make sure the temporary buffer is long enough to fit that
data.
2010-12-17 11:02:56 +02:00
Jouni Malinen
4d00fe48e3 wlantest: Fix error path in TDLS-not-found case 2010-12-17 08:26:39 +02:00
Jouni Malinen
30e09b0d75 wlantest: Avoid aliasing a function parameter by renaming local variable 2010-12-17 08:22:07 +02:00
Jouni Malinen
cb384549e2 wlantest: Remove unnecessary validation code
This condition is already checked above when figuring out whether a key
is known and as such, there is no point in keeping this check here.
2010-12-17 08:16:12 +02:00
Jouni Malinen
ef00c78097 wlantest: Replace pcap header directory
The use of the pcap subdirectory seems to be limited to some of the
newer Linux distros only, so use the older paths to pcap.h and
pcap-bpf.h to make wlantest bit more easier to compile on older
systems.
2010-12-17 08:06:52 +02:00
Jouni Malinen
0e42fff3de wlantest: Add counters and AP/direct path validation for TDLS
These can be used to write automated test scripts for verifying
that TDLS STAs are using correct data path.
2010-12-16 19:08:49 +02:00
Jouni Malinen
29ec745719 wlantest: Check FTIE MIC in TDLS Teardown messages 2010-12-16 17:08:00 +02:00
Jouni Malinen
b3a6d9d400 wlantest: Add send command for injecting raw frames
This can be used by external programs (e.g., wlantest_cli) to inject
raw frames (hex dump of the frame header and body). The data can be
requested to be sent as-is or protected with the current key.
2010-12-16 16:11:54 +02:00
Jouni Malinen
b39f58347d wlantest: Add support for decrypting TDLS frames
Derive TPK based on TDLS TPK Handshake and decrypt frames on the
direct link with TPK-TK.
2010-12-13 11:20:55 +02:00
Jouni Malinen
0f3e4f2a83 wlantest: Add support for reading DLT_IEEE802_11 pcap files 2010-12-04 11:18:21 -08:00
Jouni Malinen
350132bec5 wlantest: Add support for reading pcap files with prism header 2010-12-02 12:56:37 -08:00