]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Preferred Candidate List with truncated BSS Termination Duration
authorJouni Malinen <jouni@codeaurora.org>
Fri, 24 May 2019 14:06:44 +0000 (17:06 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 24 May 2019 22:20:01 +0000 (01:20 +0300)
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
tests/hwsim/test_wnm.py

index 07d18702a4418a5b12ee8d1c8fd7a91482a74e5d..66d74c351257cbc056e5d9e4ef440004968b9ad2 100644 (file)
@@ -691,6 +691,19 @@ def test_wnm_bss_tm_req(dev, apdev):
     resp = rx_bss_tm_resp(hapd, expect_dialog=8, expect_status=7)
     dev[0].dump_monitor()
 
+    # Preferred Candidate List with truncated BSS Termination Duration
+    # WNM: Too short BSS termination duration
+    req = bss_tm_req(addr, apdev[0]['bssid'],
+                     req_mode=0x01, dialog_token=8)
+    # BSS Termination Duration (truncated)
+    subelems = struct.pack("<BBQB", 4, 9, 0, 10)
+    req['payload'] += struct.pack("<BB6BLBBB", 52, 13 + len(subelems),
+                                  1, 2, 3, 4, 5, 6,
+                                  0, 81, 1, 7) + subelems
+    hapd.mgmt_tx(req)
+    resp = rx_bss_tm_resp(hapd, expect_dialog=8, expect_status=7)
+    dev[0].dump_monitor()
+
     # Preferred Candidate List followed by vendor element
     req = bss_tm_req(addr, apdev[0]['bssid'],
                      req_mode=0x01, dialog_token=8)