aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2018-12-24 18:31:47 (GMT)
committerJouni Malinen <j@w1.fi>2018-12-24 18:31:47 (GMT)
commite7b141906b8524427912672788c40049c63fa7a8 (patch)
treea3785bf379d805def22243b771672fb199c5217b /tests
parent5759bd36aac6e2b2ceecaf476357188eaab583a3 (diff)
downloadhostap-e7b141906b8524427912672788c40049c63fa7a8.zip
hostap-e7b141906b8524427912672788c40049c63fa7a8.tar.gz
hostap-e7b141906b8524427912672788c40049c63fa7a8.tar.bz2
tests: Do not override connectivity test address if no driver info
Not all driver interfaces provide driver status information with the local address, so skip the override step if the field is not available. This is needed, e.g., with macsec_linux. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/hwsim_utils.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/hwsim/hwsim_utils.py b/tests/hwsim/hwsim_utils.py
index 7a82df6..06d59c4 100644
--- a/tests/hwsim/hwsim_utils.py
+++ b/tests/hwsim/hwsim_utils.py
@@ -16,11 +16,15 @@ def run_connectivity_test(dev1, dev2, tos, dev1group=False, dev2group=False,
multicast_to_unicast=False, broadcast=True):
addr1 = dev1.own_addr()
if not dev1group and isinstance(dev1, WpaSupplicant):
- addr1 = dev1.get_driver_status_field('addr')
+ addr = dev1.get_driver_status_field('addr')
+ if addr:
+ addr1 = addr
addr2 = dev2.own_addr()
if not dev2group and isinstance(dev2, WpaSupplicant):
- addr2 = dev2.get_driver_status_field('addr')
+ addr = dev2.get_driver_status_field('addr')
+ if addr:
+ addr2 = addr
dev1.dump_monitor()
dev2.dump_monitor()