"""Send ARP request, expect a reply and verify its fields.
returns: test status
+ :raises RuntimeError: ARP reply timeout.
"""
test_passed = False
(src_if, src_mac, dst_mac, src_ip, dst_ip) = parse_arguments()
# wait for APR reply
ether = interface.recv_pkt()
+ if not ether:
+ raise RuntimeError("ARP reply timeout")
+
# verify received packet
if not ether.haslayer(ARP):
except RuntimeError as ex:
print 'Error occurred: {}'.format(ex)
- finally:
- interface.close()
return test_passed