sign: Filter out ICMP packets with sign in test script

A limitation of the current design where the sign protocol appears at
the end of frame is that such a data packet could potentially trigger a
ICMP error containing this packet as payload and for small size packets
this ICMP packet itself will appear as a 'sign' packet - so filter out
ICMP from the captured packets when verifying against stream stats
This commit is contained in:
Srivats P 2016-12-08 20:54:38 +05:30
parent 8f97a69220
commit 58a16a253e

View File

@ -490,7 +490,8 @@ def test_unidir(drone, ports, dut, dut_ports, dut_ip, emul_ports, dgid_list,
guid = sign_stream_cfg['guid'][i] guid = sign_stream_cfg['guid'][i]
if guid < 0: if guid < 0:
continue continue
filter='frame[-9:9]==00.00.00.'+format(guid, 'x')+'.61.a1.b2.c3.d4' filter='frame[-9:9]==00.00.00.'+format(guid, 'x')+'.61.a1.b2.c3.d4'\
+ ' && !icmp && !icmpv6'
print(filter) print(filter)
cap_pkts = subprocess.check_output([tshark, '-n', '-r', 'capX.pcap', cap_pkts = subprocess.check_output([tshark, '-n', '-r', 'capX.pcap',
'-Y', filter]) '-Y', filter])
@ -530,7 +531,8 @@ def test_unidir(drone, ports, dut, dut_ports, dut_ip, emul_ports, dgid_list,
guid = sign_stream_cfg['guid'][i] guid = sign_stream_cfg['guid'][i]
if guid < 0: if guid < 0:
continue continue
filter='frame[-9:9]==00.00.00.'+format(guid, 'x')+'.61.a1.b2.c3.d4' filter='frame[-9:9]==00.00.00.'+format(guid, 'x')+'.61.a1.b2.c3.d4'\
+ ' && !icmp && !icmpv6'
print(filter) print(filter)
cap_pkts = subprocess.check_output([tshark, '-n', '-r', 'capY.pcap', cap_pkts = subprocess.check_output([tshark, '-n', '-r', 'capY.pcap',
'-Y', filter]) '-Y', filter])