]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Update Wireshark filter for MLD test cases
authorAditya Kumar Singh <quic_adisi@quicinc.com>
Mon, 17 Feb 2025 04:32:34 +0000 (10:02 +0530)
committerJouni Malinen <j@w1.fi>
Sun, 23 Feb 2025 16:12:16 +0000 (18:12 +0200)
With Wireshark 4.4.0 and above, there are slight changes in the filters for
fetching multi-link control elements and STA profile ID lists. Add support
for these updates to ensure the test cases are compatible with the latest
version of Wireshark.

The changes are:
* Multi-Link Control:
  wlan.eht.multi_link.control instead of wlan.eht.multi_link_control

* STA Profiles LinkIds: It is now Character string.

Latest Documentation:  https://www.wireshark.org/docs/dfref/w/wlan.html

Signed-off-by: Aditya Kumar Singh <quic_adisi@quicinc.com>
tests/hwsim/test_eht.py

index c1bab3f3612feebe16757f58e0d7dc1f89879824..d75ba87d2e61d4b05219d23c0ba604a0685baab8 100644 (file)
@@ -928,7 +928,8 @@ def test_eht_mld_connect_probes(dev, apdev, params):
         wpas.connect(ssid, sae_password= passphrase, ieee80211w="2",
                      key_mgmt="SAE", scan_freq="2412")
 
-        filters = ['wlan.fc.type_subtype == 0x0004 && wlan.ext_tag.length == 8 && wlan.ext_tag.number == 107 && wlan.eht.multi_link_control == 0x0011 && wlan.eht.multi_link.common_info.length == 2 && wlan.eht.multi_link.common_info.mld_id == 0 && wlan.eht.multi_link.sta_profile.subelt_id == 0 && wlan.eht.multi_link.sta_profile.subelt_len == 2 && wlan.eht.multi_link.type_1.sta_profile_count == 1 && wlan.eht.multi_link.sta_profile_id_list == 1',
+        filters = ['wlan.fc.type_subtype == 0x0004 && wlan.ext_tag.length == 8 && wlan.ext_tag.number == 107 && wlan.eht.multi_link.control == 0x0011 && wlan.eht.multi_link.common_info.length == 2 && wlan.eht.multi_link.common_info.mld_id == 0 && wlan.eht.multi_link.sta_profile.subelt_id == 0 && wlan.eht.multi_link.sta_profile.subelt_len == 2 && wlan.eht.multi_link.type_1.sta_profile_count == 1 && wlan.eht.multi_link.sta_profile_id_list == \'1\'',
+                   'wlan.fc.type_subtype == 0x0004 && wlan.ext_tag.length == 8 && wlan.ext_tag.number == 107 && wlan.eht.multi_link_control == 0x0011 && wlan.eht.multi_link.common_info.length == 2 && wlan.eht.multi_link.common_info.mld_id == 0 && wlan.eht.multi_link.sta_profile.subelt_id == 0 && wlan.eht.multi_link.sta_profile.subelt_len == 2 && wlan.eht.multi_link.type_1.sta_profile_count == 1 && wlan.eht.multi_link.sta_profile_id_list == 1',
                    'wlan.fc.type_subtype == 0x0004 && wlan.ext_tag.number == 107 && wlan.ext_tag.data == 11:00:02:00:00:02:11:00']
         out = run_tshark(os.path.join(params['logdir'], 'hwsim0.pcapng'),
                          filters, display=['frame.number'])
@@ -1058,7 +1059,8 @@ def test_eht_connect_invalid_link(dev, apdev, params):
         eht_verify_status(wpas, hapd0, 2412, 20, is_ht=True, mld=True,
                           valid_links=1, active_links=1)
 
-        filters = ['wlan.fc.type_subtype == 0x0000 && wlan.ext_tag.length == 11 && wlan.ext_tag.number == 107 && wlan.eht.multi_link_control == 0x0100 && wlan.eht.multi_link.common_info.length == 9 && wlan.eht.multi_link.common_info.mld_mac_address == %s && wlan.eht.multi_link.common_info.mld_capabilities == 0x0000' % wpas.own_addr(),
+        filters = ['wlan.fc.type_subtype == 0x0000 && wlan.ext_tag.length == 11 && wlan.ext_tag.number == 107 && wlan.eht.multi_link.control == 0x0100 && wlan.eht.multi_link.common_info.length == 9 && wlan.eht.multi_link.common_info.mld_mac_address == %s && wlan.eht.multi_link.common_info.mld_capabilities == 0x0000' % wpas.own_addr(),
+                   'wlan.fc.type_subtype == 0x0000 && wlan.ext_tag.length == 11 && wlan.ext_tag.number == 107 && wlan.eht.multi_link_control == 0x0100 && wlan.eht.multi_link.common_info.length == 9 && wlan.eht.multi_link.common_info.mld_mac_address == %s && wlan.eht.multi_link.common_info.mld_capabilities == 0x0000' % wpas.own_addr(),
                    'wlan.fc.type_subtype == 0x0000 && wlan.ext_tag.data == 00:01:09:%s:00:00' % wpas.own_addr()]
         out = run_tshark(os.path.join(params['logdir'], 'hwsim0.pcapng'),
                          filters, display=['frame.number'])