]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: id_str in network configuration
authorJouni Malinen <j@w1.fi>
Sat, 26 Apr 2014 14:05:57 +0000 (17:05 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 29 Apr 2014 09:52:10 +0000 (12:52 +0300)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_ap_open.py
tests/hwsim/wpasupplicant.py

index 46a474a5c8839341663a05ef353ad8d6766b150d..74f6038dc1599b8d9892c901395f40373d2c8a6c 100644 (file)
@@ -107,3 +107,16 @@ def test_ap_open_assoc_timeout(dev, apdev):
     ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED"], timeout=15)
     if ev is None:
         raise Exception("Timeout on connection")
+
+def test_ap_open_id_str(dev, apdev):
+    """AP with open mode and id_str"""
+    hapd = hostapd.add_ap(apdev[0]['ifname'], { "ssid": "open" })
+    dev[0].connect("open", key_mgmt="NONE", scan_freq="2412", id_str="foo",
+                   wait_connect=False)
+    ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED"])
+    if ev is None:
+        raise Exception("Association with the AP timed out")
+    if "id_str=foo" not in ev:
+        raise Exception("CTRL-EVENT-CONNECT did not have matching id_str: " + ev)
+    if dev[0].get_status_field("id_str") != "foo":
+        raise Exception("id_str mismatch")
index 8733cae9052acc02a265723073f961e7a7119f36..24d5dbfe0dc8e67ae6ae945c4e832f4717dd5e65 100644 (file)
@@ -648,7 +648,7 @@ class WpaSupplicant:
                    "private_key_passwd", "ca_cert2", "client_cert2",
                    "private_key2", "phase1", "phase2", "domain_suffix_match",
                    "altsubject_match", "subject_match", "pac_file", "dh_file",
-                   "bgscan", "ht_mcs" ]
+                   "bgscan", "ht_mcs", "id_str" ]
         for field in quoted:
             if field in kwargs and kwargs[field]:
                 self.set_network_quoted(id, field, kwargs[field])