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>
This commit is contained in:
parent
5759bd36aa
commit
e7b141906b
1 changed files with 6 additions and 2 deletions
|
@ -16,11 +16,15 @@ def run_connectivity_test(dev1, dev2, tos, dev1group=False, dev2group=False,
|
||||||
multicast_to_unicast=False, broadcast=True):
|
multicast_to_unicast=False, broadcast=True):
|
||||||
addr1 = dev1.own_addr()
|
addr1 = dev1.own_addr()
|
||||||
if not dev1group and isinstance(dev1, WpaSupplicant):
|
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()
|
addr2 = dev2.own_addr()
|
||||||
if not dev2group and isinstance(dev2, WpaSupplicant):
|
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()
|
dev1.dump_monitor()
|
||||||
dev2.dump_monitor()
|
dev2.dump_monitor()
|
||||||
|
|
Loading…
Reference in a new issue