tests: Add ap_reload_bss_only
The test checks that when the SSID of a BSS is changed using SET+RELOAD_BSS, the stations already connected to other BSSes on the same radio are not disconnected. It also checks that stations can connect using the new SSID after the reload. Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
This commit is contained in:
parent
af1528a128
commit
e7829e4466
1 changed files with 23 additions and 0 deletions
|
@ -584,3 +584,26 @@ def test_ap_bss_config_file(dev, apdev, params):
|
||||||
break
|
break
|
||||||
if os.path.exists(pidfile):
|
if os.path.exists(pidfile):
|
||||||
raise Exception("PID file exits after process termination")
|
raise Exception("PID file exits after process termination")
|
||||||
|
|
||||||
|
def test_ap_reload_bss_only(dev, apdev, params):
|
||||||
|
"""Dynamic SSID change on only one BSS using RELOAD_BSS"""
|
||||||
|
ifname1 = apdev[0]['ifname']
|
||||||
|
ifname2 = apdev[0]['ifname'] + '-2'
|
||||||
|
hapd1 = hostapd.add_bss(apdev[0], ifname1, 'bss-1.conf')
|
||||||
|
hapd2 = hostapd.add_bss(apdev[0], ifname2, 'bss-2.conf')
|
||||||
|
id = dev[0].connect("bss-1", key_mgmt="NONE", scan_freq="2412")
|
||||||
|
dev[1].connect("bss-2", key_mgmt="NONE", scan_freq="2412")
|
||||||
|
|
||||||
|
res = hapd1.request("SET ssid test-new-ssid")
|
||||||
|
if "OK" not in res:
|
||||||
|
raise Exception("SET command failed")
|
||||||
|
res = hapd1.request("RELOAD_BSS")
|
||||||
|
if "OK" not in res:
|
||||||
|
raise Exception("RELOAD_BSS command failed")
|
||||||
|
|
||||||
|
ev = dev[1].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=1)
|
||||||
|
if ev is not None:
|
||||||
|
raise Exception("Unexpected disconnection when RELOAD_BSS was sent on another BSS.")
|
||||||
|
|
||||||
|
dev[0].set_network_quoted(id, "ssid", "test-new-ssid")
|
||||||
|
dev[0].connect_network(id)
|
||||||
|
|
Loading…
Reference in a new issue