mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
tests: Use different country in p2p_go_move_reg_change
Use of country=00 (world roaming) seemed to not work anymore with the current cfg80211 regulatory implementation since the existing channel is left enabled when moving to country=00. Use a specific country code that does enforce the selected channel from being used anymore to make this test case pass again. The change in cfg80211 behavior is from the kernel commit 113f3aaa81bd ("cfg80211: Prevent regulatory restore during STA disconnect in concurrent interfaces"). Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
fb643190dc
commit
b9c33e3fba
@ -759,24 +759,32 @@ def test_p2p_go_move_reg_change(dev, apdev):
|
|||||||
"""P2P GO move due to regulatory change"""
|
"""P2P GO move due to regulatory change"""
|
||||||
try:
|
try:
|
||||||
set_country("US")
|
set_country("US")
|
||||||
dev[0].global_request("P2P_SET disallow_freq 2400-5000")
|
dev[0].global_request("P2P_SET disallow_freq 2400-5000,5700-6000")
|
||||||
res = autogo(dev[0])
|
res = autogo(dev[0])
|
||||||
freq1 = int(res['freq'])
|
freq1 = int(res['freq'])
|
||||||
if freq1 < 5000:
|
if freq1 < 5000:
|
||||||
raise Exception("Unexpected channel %d MHz" % freq1)
|
raise Exception("Unexpected channel %d MHz" % freq1)
|
||||||
|
dev[0].dump_monitor()
|
||||||
|
|
||||||
dev[0].global_request("P2P_SET disallow_freq ")
|
dev[0].global_request("P2P_SET disallow_freq ")
|
||||||
|
|
||||||
# GO move is not allowed while waiting for initial client connection
|
# GO move is not allowed while waiting for initial client connection
|
||||||
connect_cli(dev[0], dev[1], freq=freq1)
|
connect_cli(dev[0], dev[1], freq=freq1)
|
||||||
dev[1].remove_group()
|
dev[1].remove_group()
|
||||||
|
ev = dev[1].wait_global_event(["P2P-GROUP-REMOVED"], timeout=5)
|
||||||
|
if ev is None:
|
||||||
|
raise Exception("P2P-GROUP-REMOVED not reported on client")
|
||||||
|
dev[1].dump_monitor()
|
||||||
|
dev[0].dump_monitor()
|
||||||
|
|
||||||
freq = dev[0].get_group_status_field('freq')
|
freq = dev[0].get_group_status_field('freq')
|
||||||
if int(freq) < 5000:
|
if int(freq) < 5000:
|
||||||
raise Exception("Unexpected freq after initial client: " + freq)
|
raise Exception("Unexpected freq after initial client: " + freq)
|
||||||
dev[0].dump_monitor()
|
dev[0].dump_monitor()
|
||||||
|
|
||||||
set_country("00")
|
dev[0].request("NOTE Setting country=BD")
|
||||||
|
set_country("BD")
|
||||||
|
dev[0].request("NOTE Waiting for GO channel change")
|
||||||
ev = dev[0].wait_group_event(["P2P-REMOVE-AND-REFORM-GROUP",
|
ev = dev[0].wait_group_event(["P2P-REMOVE-AND-REFORM-GROUP",
|
||||||
"AP-CSA-FINISHED"],
|
"AP-CSA-FINISHED"],
|
||||||
timeout=10)
|
timeout=10)
|
||||||
|
Loading…
Reference in New Issue
Block a user