X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Ftraffic_scripts%2Fsend_ip_icmp.py;h=f797bda163db2d68536d19660258df4c1851fdd9;hp=fd15376fb12262d25b093728db5b1d52866a1b5c;hb=4fc12a553db78ff2ad293e7a87845b365a53d736;hpb=33499c81c94c2d3baef9d3e9f061cd76ef86fa74 diff --git a/resources/traffic_scripts/send_ip_icmp.py b/resources/traffic_scripts/send_ip_icmp.py index fd15376fb1..f797bda163 100755 --- 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) / \ - 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) - ether = rxq.recv(1) + ether = rxq.recv(10) # 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): - rxq._proc.terminate() 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__())) - rxq._proc.terminate() sys.exit(0) if __name__ == "__main__":