]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: EAP-pwd protocol tests - unexpected more-fragment frame
authorJouni Malinen <jouni@codeaurora.org>
Tue, 16 Apr 2019 23:22:51 +0000 (02:22 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 17 Apr 2019 10:24:37 +0000 (13:24 +0300)
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
tests/hwsim/test_eap_proto.py

index b37b8f8e87a62c06df3f17992d0d87ee50005927..9cf4f0a65d5c495a4525b945640ef4bd34f281ff 100644 (file)
@@ -6806,6 +6806,17 @@ def start_pwd_exchange(dev, ap):
     proxy_msg(dev, hapd) # EAP-pwd-ID/Response
     return hapd
 
+def test_eap_proto_pwd_unexpected_fragment(dev, apdev):
+    """EAP-pwd protocol tests - unexpected more-fragment frame"""
+    hapd = start_pwd_exchange(dev[0], apdev[0])
+
+    # EAP-pwd-Commit/Request
+    req = rx_msg(hapd)
+    if req[18:20] != "02":
+        raise Exception("Unexpected EAP-pwd-Commit/Request flag")
+    msg = req[0:18] + "42" + req[20:]
+    tx_msg(hapd, dev[0], msg)
+
 def test_eap_proto_pwd_reflection_attack(dev, apdev):
     """EAP-pwd protocol tests - reflection attack on the server"""
     hapd = start_pwd_exchange(dev[0], apdev[0])