Code Review
/
csit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Change send_ip_icmp recv timeout to 2sec
[csit.git]
/
resources
/
traffic_scripts
/
send_ip_icmp.py
diff --git
a/resources/traffic_scripts/send_ip_icmp.py
b/resources/traffic_scripts/send_ip_icmp.py
index
fd15376
..
711bf3d
100755
(executable)
--- a/
resources/traffic_scripts/send_ip_icmp.py
+++ b/
resources/traffic_scripts/send_ip_icmp.py
@@
-40,31
+40,27
@@
def main():
# Create empty ip ICMP packet and add padding before sending
pkt_raw = Ether(src=src_mac, dst=dst_mac) / \
# Create empty ip ICMP packet and add padding before sending
pkt_raw = Ether(src=src_mac, dst=dst_mac) / \
-
IP(src=src_ip, dst=dst_ip) / \
-
ICMP()
+ IP(src=src_ip, dst=dst_ip) / \
+ ICMP()
# Send created packet on one interface and receive on the other
sent_packets.append(pkt_raw)
txq.send(pkt_raw)
# Send created packet on one interface and receive on the other
sent_packets.append(pkt_raw)
txq.send(pkt_raw)
- ether = rxq.recv(
1
)
+ ether = rxq.recv(
2
)
# Check whether received packet contains layers Ether, IP and ICMP
if ether is None:
# Check whether received packet contains layers Ether, IP and ICMP
if ether is None:
- rxq._proc.terminate()
- raise RuntimeError('ICMPv6 echo reply Rx timeout')
+ raise RuntimeError('ICMP echo Rx timeout')
if not ether.haslayer(IP):
if not ether.haslayer(IP):
- rxq._proc.terminate()
raise RuntimeError(
'Not an IP packet received {0}'.format(ether.__repr__()))
if not ether.haslayer(ICMP):
raise RuntimeError(
'Not an IP packet received {0}'.format(ether.__repr__()))
if not ether.haslayer(ICMP):
- rxq._proc.terminate()
raise RuntimeError(
'Not an ICMP packet received {0}'.format(ether.__repr__()))
raise RuntimeError(
'Not an ICMP packet received {0}'.format(ether.__repr__()))
- rxq._proc.terminate()
sys.exit(0)
if __name__ == "__main__":
sys.exit(0)
if __name__ == "__main__":