]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Pass full apdev to add_ap() function (6)
authorJanusz Dziedzic <janusz.dziedzic@tieto.com>
Wed, 30 Mar 2016 08:55:56 +0000 (10:55 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 3 Apr 2016 19:46:14 +0000 (22:46 +0300)
Pass the full apdev to the add_ap() function instead of just ifname.
This allows us to handle also remote hosts while we can check
apdev['hostname'], apdev['port'].

This step (6) converts the cases where apdevs[#]['ifname'] was used as
the argument to hostapd.add_ap().

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
tests/hwsim/test_hs20_filter.py

index d17b03fb4319a11e44be915ada8673cee8a40b73..1ec3343d13f1f37800f4b5fab0852c3748929109 100644 (file)
@@ -44,7 +44,7 @@ def _test_ip4_gtk_drop(devs, apdevs, params, dst):
         raise HwsimSkip("kernel doesn't have capability")
 
     ap_params = { 'ssid': 'open', 'channel': '5' }
-    hapd = hostapd.add_ap(apdevs[0]['ifname'], ap_params)
+    hapd = hostapd.add_ap(apdevs[0], ap_params)
     dev.connect('open', key_mgmt="NONE", scan_freq="2432")
 
     with IPAssign(dev.ifname, '10.0.0.1/24'):
@@ -93,7 +93,7 @@ def _test_ip6_gtk_drop(devs, apdevs, params, dst):
         raise HwsimSkip("kernel doesn't have capability")
 
     ap_params = { 'ssid': 'open', 'channel': '5' }
-    hapd = hostapd.add_ap(apdevs[0]['ifname'], ap_params)
+    hapd = hostapd.add_ap(apdevs[0], ap_params)
     dev.connect('open', key_mgmt="NONE", scan_freq="2432")
 
     with IPAssign(dev.ifname, 'fdaa::1/48', ipv6=True):
@@ -142,7 +142,7 @@ def test_ip4_drop_gratuitous_arp(devs, apdevs, params):
         raise HwsimSkip("kernel doesn't have capability")
 
     ap_params = { 'ssid': 'open', 'channel': '5' }
-    hapd = hostapd.add_ap(apdevs[0]['ifname'], ap_params)
+    hapd = hostapd.add_ap(apdevs[0], ap_params)
     dev.connect('open', key_mgmt="NONE", scan_freq="2432")
 
     with IPAssign(dev.ifname, '10.0.0.2/24'):
@@ -185,7 +185,7 @@ def test_ip6_drop_unsolicited_na(devs, apdevs, params):
         raise HwsimSkip("kernel doesn't have capability")
 
     ap_params = { 'ssid': 'open', 'channel': '5' }
-    hapd = hostapd.add_ap(apdevs[0]['ifname'], ap_params)
+    hapd = hostapd.add_ap(apdevs[0], ap_params)
     dev.connect('open', key_mgmt="NONE", scan_freq="2432")
 
     with IPAssign(dev.ifname, 'fdaa::1/48', ipv6=True):