[PATCH 5/6] tests: proxyarp: skip test if ebtables rule install fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Otherwise the test will continue on and fail later due to
unexpected foreign ARP request.

Signed-off-by: Thomas Pedersen <thomas@xxxxxxxxxxxx>
---
 tests/hwsim/test_ap_hs20.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/tests/hwsim/test_ap_hs20.py b/tests/hwsim/test_ap_hs20.py
index c484b500352e..536418946d29 100644
--- a/tests/hwsim/test_ap_hs20.py
+++ b/tests/hwsim/test_ap_hs20.py
@@ -4672,9 +4672,11 @@ def _test_proxyarp_open(dev, apdev, params, ebtables=False):
     if ebtables:
         for chain in ['FORWARD', 'OUTPUT']:
             try:
-                subprocess.call(['ebtables', '-A', chain, '-p', 'ARP',
-                                 '-d', 'Broadcast', '-o', apdev[0]['ifname'],
-                                 '-j', 'DROP'])
+                err = subprocess.call(['ebtables', '-A', chain, '-p', 'ARP',
+                                      '-d', 'Broadcast', '-o', apdev[0]['ifname'],
+                                      '-j', 'DROP'])
+                if err != 0:
+                    raise
             except:
                 raise HwsimSkip("No ebtables available")
 
-- 
2.20.1


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux