path: root/wlantest
Commit message (Collapse)AuthorAgeFilesLines
* wlantest: Use local ETH_P_IP define instead of linux/if_ether.hJouni Malinen2016-03-261-1/+0
| | | | | | | | There is no strong need for pulling in linux/if_ether.h here since all that is needed if ETH_P_IP and we already cover multiple other ETH_P_* values in utils/common.h. Signed-off-by: Jouni Malinen <j@w1.fi>
* wlantest: Fix bip_protect() memory allocationJouni Malinen2016-03-141-1/+1
| | | | | | | | | The addition operator is of higher precedence than the ternary conditional and the construction here needs to use parentheses to calculate the buffer length properly when generating test frames with BIP protection. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* wlantest: Add -N command line argument to remove write bufferingJouni Malinen2015-11-264-2/+18
| | | | | | | | | This makes it easier to do live parsing of captured pcap files from wlantest without having to rename and restart the capture file. Packet writes are flushed to disk after each packet if -N is included in the command line. Signed-off-by: Jouni Malinen <j@w1.fi>
* wlantest: Add support for FT-PSK initial association key derivationJouni Malinen2015-08-064-7/+58
| | | | | | | This adds minimal support for deriving keys for FT-PSK to allow the initial mobility domain association to be analyzed in more detail. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* wlantest: Fix a copy-paste error in a debug messageJouni Malinen2015-05-241-2/+1
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* Declare all read only data structures as constMikael Kanstrup2015-04-253-8/+8
| | | | | | | | By analysing objdump output some read only structures were found in .data section. To help compiler further optimize code declare these as const. Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
* Simplify Timeout Interval element parsingJouni Malinen2015-04-222-5/+3
| | | | | | | Remove the length field from struct ieee802_11_elems since the only allowed element length is five and that is checked by the parser. Signed-off-by: Jouni Malinen <j@w1.fi>
* wlantest: Verify FTIE length before checking MICJouni Malinen2015-04-221-2/+4
| | | | | | | | | tdls_verify_mic() and tdls_verify_mic_teardown() could have tried to read the 16-octet FTIE MIC when processing a TDLS frame even if the received FTIE is truncated. At least in theory, this could result in reading couple of octets beyond the frame buffer. Signed-off-by: Jouni Malinen <j@w1.fi>
* wlantest: Fix Beacon and Probe Response frame parserJouni Malinen2015-04-221-4/+10
| | | | | | | | These functions did not verify that the received frame is long enough to contain the beginning of the variable length IE area. A truncated frame could have caused a segmentation fault due to reading beyond the buffer. Signed-off-by: Jouni Malinen <j@w1.fi>
* Add Suite B 192-bit AKMJouni Malinen2015-01-262-3/+8
| | | | | | | WPA-EAP-SUITE-B-192 can now be used to select 192-bit level Suite B into use as the key management method. Signed-off-by: Jouni Malinen <j@w1.fi>
* Preparations for variable length KCK and KEKJouni Malinen2015-01-265-66/+82
| | | | | | | | This modifies struct wpa_ptk to allow the length of KCK and KEK to be stored. This is needed to allow longer keys to be used, e.g., with Suite B 192-bit level. Signed-off-by: Jouni Malinen <j@w1.fi>
* wlantest: Extend BIP validation to support GMAC-128 and GMAC-256Jouni Malinen2015-01-241-12/+33
| | | | Signed-off-by: Jouni Malinen <j@w1.fi>
* wlantest: New mgmt_group_cipher values for BSS info and debug logJouni Malinen2015-01-242-3/+19
| | | | | | | This adds BIP-GMAC-128, BIP-GMAC-256, and BIP-CMAC-256 to info_bss command and debug log. Signed-off-by: Jouni Malinen <j@w1.fi>
* wlantest: Extend BIP support to cover BIP-CMAC-256Jouni Malinen2015-01-246-28/+74
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* Add QUIET=1 option for makeJouni Malinen2014-12-291-0/+4
| | | | | | This can be used to reduce verbosity for build messages. Signed-off-by: Jouni Malinen <j@w1.fi>
* Clean up debug prints to use wpa_printf()Jouni Malinen2014-12-261-1/+1
| | | | | | | This converts most of the remaining perror() and printf() calls from hostapd and wpa_supplicant to use wpa_printf(). Signed-off-by: Jouni Malinen <j@w1.fi>
* Suite B: Select EAPOL-Key integrity and key-wrap algorithms based on AKMJouni Malinen2014-11-161-9/+16
| | | | | | | | | This adds support for AKM 00-0F-AC:11 to specify the integrity and key-wrap algorithms for EAPOL-Key frames using the new design where descriptor version is set to 0 and algorithms are determined based on AKM. Signed-off-by: Jouni Malinen <j@w1.fi>
* Suite B: Add AKM 00-0F-AC:11Jouni Malinen2014-11-162-1/+6
| | | | | | | | This adds definitions for the 128-bit level Suite B AKM 00-0F-AC:11. The functionality itself is not yet complete, i.e., this commit only includes parts to negotiate the new AKM. Signed-off-by: Jouni Malinen <j@w1.fi>
* AES: Extend key wrap design to support longer AES keysJouni Malinen2014-10-071-1/+1
| | | | | | | | | | | This adds kek_len argument to aes_wrap() and aes_unwrap() functions and allows AES to be initialized with 192 and 256 bit KEK in addition to the previously supported 128 bit KEK. The test vectors in test-aes.c are extended to cover all the test vectors from RFC 3394. Signed-off-by: Jouni Malinen <j@w1.fi>
* wlantest: Add decryption of CCMP-256, GCMP, GCMP-256Ashok Kumar Ponnaiah2014-09-034-14/+56
| | | | | | This extends wlantest support for decrypting the new cipher suites. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* wlantest: Indicate if a TKIP/CCMP replay has Retry=1Ashok Kumar Ponnaiah2014-09-032-6/+12
| | | | Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* wlantest: Recognize CCMP-256, GCMP, and GCMP-256 ciphersAshok Kumar Ponnaiah2014-09-032-3/+16
| | | | | | | This adds support for displaying whether a BSS or STA is using one of the newer cipher suites. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* wlantest: Add support for OSENJouni Malinen2014-05-155-8/+63
| | | | | | | | This allows Hotspot 2.0 OSEN connection to be analyzed more conveniently. The frames from an OSEN association can now be decrypted using an MSK file. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
* wlantest: Tag and ignore generated packetsJohannes Berg2014-04-132-7/+13
| | | | | | | | Rather than ignoring packets with a minimal 8-byte radiotap header, which may occur elsewhere, tag generated (decrypted) packets with an empty vendor namespace tag and ignore those. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* radiotap: Update radiotap parser to library versionJohannes Berg2014-04-131-4/+4
| | | | | | | | Update the radiotap parser to the latest version of the http://git.sipsolutions.net/radiotap.git/ library to get parsing for vendor namespaces. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* Declare wpa_debug_* variables in src/utils/wpa_debug.hJouni Malinen2013-12-314-13/+0
| | | | | | | | | These were somewhat more hidden to avoid direct use, but there are now numerous places where these are needed and more justification to make the extern int declarations available from wpa_debug.h. In addition, this avoids some warnings from sparse. Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Add a BSS probe_response counterJouni Malinen2013-12-263-0/+3
| | | | | | | This can be used to verify whether an AP replies to a Probe Request frame. Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Add per-TID RX/TX countersJouni Malinen2013-12-245-2/+239
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* Use monotonic clock for relative time for eloop if availableJohannes Berg2013-11-201-1/+3
| | | | | | | | | | | | | | | Relative time shouldn't be calculated based on gettimeofday because that clock can jump (e.g., when the time is adjusted by the system administrator.) On systems where that is available, use CLOCK_BOOTTIME (on fairly recent Linux systems, this clock takes into account the time spend suspended) or CLOCK_MONOTONIC (on Linux and some POSIX systems, this clock is just freely running with no adjustments.) Reported-by: Holger Schurig <holgerschurig@gmail.com> Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* wlantest: Add more pcapng notes on EAPOL processingJouni Malinen2013-11-171-28/+32
| | | | | | | | Some of the MIC validation steps were not logged in the pcapng notes. Add these to make the entries more consistent and to provide more information to ease debugging. Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Allow additional PTKs to be specified from a fileJouni Malinen2013-11-174-5/+154
| | | | | | | | | | A text file with a hexdump of PTK (KCK|KEK=TK with 48 octets for CCMP or 64 octets for TKIP or alternative 16 or 32 octet TK for CCMP/TKIP) can now be read from a file specified with the -T command line argument. If the current known PTK fails to decrypt a frame (or if no current PTK is known) all listed PTKs are iterated to see if any of them matches. Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Add support for debug log timestampsJouni Malinen2013-11-171-2/+6
| | | | | | | The new command line argument -t can now be used to request wlantest to include a timestamp in the log entries. Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Add support for log output into a fileJouni Malinen2013-11-172-2/+14
| | | | | | | This allows wlantest debug log output to be directed to a file so that RELOG command can be used to rotate files more easily than stdout. Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Add RELOG command to reopen log/capture filesJouni Malinen2013-11-175-10/+54
| | | | | | | This can be used similarly to the wpa_supplicant RELOG command to rotate log and capture files. Signed-hostap: Jouni Malinen <j@w1.fi>
* Validate P802.11ac test vector resultJouni Malinen2013-11-171-19/+92
| | | | | | | Verify the expected value against P802.11ac/D7.0 CCMP-256, GCMP-256, BIP-GMAC-128, and BIP-GMAC-256 test vectors. Signed-hostap: Jouni Malinen <j@w1.fi>
* Extend GCMP test vectors to include both MPDUsJouni Malinen2013-11-172-38/+190
| | | | | | | | | IEEE Std 802.11ad-2012 includes two test vectors for GCMP. Verify both of those and also verify that the results match the values in the standard instead of just verifying that decrypted frame matches original. Signed-hostap: Jouni Malinen <j@w1.fi>
* Use ARRAY_SIZE() macroJouni Malinen2013-10-261-10/+8
| | | | | | | Replace the common sizeof(a)/sizeof(a[0]) constructions with a more readable version. Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Always write radiotap pcap-ngJohannes Berg2013-06-221-4/+36
| | | | | | | | When writing pcap-ng files, always include a radiotap header even if there wasn't one in the input. For now just drop prism headers, I don't have any to test. Signed-hostap: Johannes Berg <johannes.berg@intel.com>
* wlantest: Recognize hwsim_test packetsJouni Malinen2013-05-261-0/+20
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Select correct TDLS context if multiple existsJouni Malinen2013-05-261-10/+20
| | | | | | | | | | Some corner cases may result in both directions of TDLS tracking context existing. If that is the case, the incorrect one may end up getting picked when figuring out which TK to use for decryption or fix statistics counter to increment. Fix this by preferring the context that has TDLS link up. Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Track TDLS setup noncesJouni Malinen2013-05-262-2/+51
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Use add_note() to annotate framesJouni Malinen2013-05-267-371/+394
| | | | | | | This adds debug information from wlantest into pcapng frame comments to make the information more convenient to use, e.g., in Wireshark. Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Add support for writing pcapng filesJouni Malinen2013-05-265-11/+336
| | | | | | | | | The new -n<file> command line argument can be used to request wlantest to write all read or captured frames into a pcapng file. This is similar to the -w argument, but with pcapng allowing per-frame comments to be embedded in the file. Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Fix the injection of protected broadcast framesChaitanya T K2013-05-041-3/+2
| | | | | | | | | Injecting protected broadcast frames fails because of the unnecessary null check for sta. In case of broadcast frames sta can be null, so remove the check. Reported-by: Janardhan R <janardhanr@posedge.com> Signed-hostap: Chaitanya T K <chaitanyatk@posedge.com>
* wlantest: Fix CCMP-256 cipherJouni Malinen2013-04-051-2/+2
| | | | | | | TK was incorrectly truncated in a way that resulted in CCMP (128-bit key) encryption being used in practice. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* wlantest: Get rid of compiler warningJouni Malinen2013-03-291-2/+0
| | | | Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Add wlantest_cli command add_wepJouni Malinen2013-03-291-1/+29
| | | | | | This can be used to configure a known WEP key for decrypting WEP frames. Signed-hostap: Jouni Malinen <j@w1.fi>
* wlantest: Add radiotap header when re-writing DLT_IEEE802_11 fileJouni Malinen2013-01-171-1/+37
| | | | | | | | When using DLT_IEEE802_11 datalink type in a pcap file, wlantest will now add a radiotap header to the re-written pcap file to make sure all frames in the output file will include the radiotap header. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* wlantest: Add -F option for assuming FCS is includedJouni Malinen2013-01-173-2/+21
| | | | | | | | | When using DLT_IEEE802_11 datalink type in a pcap file, wlantest can now be instructed to assume there is an FCS included in the frame by adding the new -F command line argument. This will make wlantest validate the FCS and strip it from the frame before processing. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
* wlantest: Process TX status frames as RX frames tooJouni Malinen2012-12-161-1/+4
| | | | | | | | This is needed to allow capture files from the mac80211 cooked monitor mode interface to be processed properly. Without this, the locally generated frames may not get processed. Signed-hostap: Jouni Malinen <j@w1.fi>