]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Fix peerkey_sniffer_check with tshark 1.10.6
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 13 Jan 2017 22:05:47 +0000 (00:05 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 13 Jan 2017 22:05:47 +0000 (00:05 +0200)
It looks like the previous mechanism for catching older tshark versions
for EAPOL-Key key info field was not sufficient. Fix that to cover the
version used in Ubuntu 14.04.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests/hwsim/test_peerkey.py

index ec182851cb8a125e0c50aad9aed9dc5b1aa3a4ef..74c81025749b0c4937b7e4b4cd5eae0f189e1743 100644 (file)
@@ -79,6 +79,15 @@ def test_peerkey_sniffer_check(dev, apdev, params):
             pass
         else:
             raise
+    if not try_other:
+        found = False
+        for pkt in out.splitlines():
+            sa, da, key_info = pkt.split('\t')
+            if key_info != '':
+                found = True
+                break
+        if not found:
+            try_other = True
     if try_other:
         out = run_tshark(os.path.join(params['logdir'], "hwsim0.pcapng"),
                          "eapol.type == 3",