aboutsummaryrefslogtreecommitdiffstats
path: root/resources/traffic_scripts/ipv6_nd_proxy_check.py
diff options
context:
space:
mode:
authorselias <samelias@cisco.com>2017-09-20 15:47:39 +0200
committerPeter Mikus <pmikus@cisco.com>2017-09-28 09:51:37 +0000
commit0513ce5642dcf58b21f9b77d6b50e4e9a7a94f04 (patch)
tree440b531fe1a999a88d42a7c47341327a8e02ef3d /resources/traffic_scripts/ipv6_nd_proxy_check.py
parent9ca5e946c7ea4b5740c257c71fe6d76eaa4206b4 (diff)
HC Test: Fix intermittent failures of HC startup
- rework "check Honeycomb startup state" keyword - increase timeout value for startup - add separators to Honeycomb log file between test suites - other minor fixes: - remove usused import from NAT suite - fix loop in ICMPv6 ND proxy traffic script - add teardown to LISP cases - update prerequisites for sub-interface SPAN test Change-Id: I2f714ffc1d2e8435d3abe690d8bd15099e071c9a Signed-off-by: selias <samelias@cisco.com>
Diffstat (limited to 'resources/traffic_scripts/ipv6_nd_proxy_check.py')
-rwxr-xr-xresources/traffic_scripts/ipv6_nd_proxy_check.py58
1 files changed, 26 insertions, 32 deletions
diff --git a/resources/traffic_scripts/ipv6_nd_proxy_check.py b/resources/traffic_scripts/ipv6_nd_proxy_check.py
index c9213999ec..1d96050cf4 100755
--- a/resources/traffic_scripts/ipv6_nd_proxy_check.py
+++ b/resources/traffic_scripts/ipv6_nd_proxy_check.py
@@ -54,16 +54,14 @@ def imcpv6nd_solicit(tx_if, src_mac, dst_mac, src_ip, dst_ip):
ether = None
for _ in range(5):
- while True:
- pkt = rxq.recv(3, ignore=sent_packets)
- if ether.haslayer(ICMPv6ND_NS):
- # read another packet in the queue in case of ICMPv6ND_NS packet
- continue
- else:
- # otherwise process the current packet
- break
- if pkt is not None:
- ether = pkt
+ ether = rxq.recv(3, ignore=sent_packets)
+ if not ether:
+ continue
+ if ether.haslayer(ICMPv6ND_NS):
+ # read another packet in the queue in case of ICMPv6ND_NS packet
+ continue
+ else:
+ # otherwise process the current packet
break
if ether is None:
@@ -132,17 +130,15 @@ def ipv6_ping(src_if, dst_if, src_mac, dst_mac,
txq.send(icmpv6_ping_pkt)
ether = None
- for _ in range(5):
- while True:
- pkt = rxq.recv(3)
- if ether.haslayer(ICMPv6ND_NS):
- # read another packet in the queue in case of ICMPv6ND_NS packet
- continue
- else:
- # otherwise process the current packet
- break
- if pkt is not None:
- ether = pkt
+ while True:
+ ether = rxq.recv(3)
+ if not ether:
+ continue
+ if ether.haslayer(ICMPv6ND_NS):
+ # read another packet in the queue in case of ICMPv6ND_NS packet
+ continue
+ else:
+ # otherwise process the current packet
break
if ether is None:
@@ -163,17 +159,15 @@ def ipv6_ping(src_if, dst_if, src_mac, dst_mac,
txq.send(icmpv6_ping_pkt)
ether = None
- for _ in range(5):
- while True:
- pkt = rxq.recv(3)
- if ether.haslayer(ICMPv6ND_NS):
- # read another packet in the queue in case of ICMPv6ND_NS packet
- continue
- else:
- # otherwise process the current packet
- break
- if pkt is not None:
- ether = pkt
+ while True:
+ ether = rxq.recv(3)
+ if not ether:
+ continue
+ if ether.haslayer(ICMPv6ND_NS):
+ # read another packet in the queue in case of ICMPv6ND_NS packet
+ continue
+ else:
+ # otherwise process the current packet
break
if ether is None: