diff options
author | Juraj Sloboda <jsloboda@cisco.com> | 2016-02-17 13:19:42 +0100 |
---|---|---|
committer | Gerrit Code Review <gerrit@fd.io> | 2016-02-17 14:44:02 +0000 |
commit | af2c77acfa337228ea3c4c5f2140f39124ec2ab9 (patch) | |
tree | 9ac0e6f86b63a421bdfe2102540b3584de0aeff7 /resources/traffic_scripts/ipv4_sweep_ping.py | |
parent | 00fe1de4bc054786d29d1cfbf623e2843dec8e4c (diff) |
Remove padding from raw network layer
Change-Id: Iee63baf142b7af586ecf8cd75c217bf624aa413d
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
Diffstat (limited to 'resources/traffic_scripts/ipv4_sweep_ping.py')
-rwxr-xr-x | resources/traffic_scripts/ipv4_sweep_ping.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/resources/traffic_scripts/ipv4_sweep_ping.py b/resources/traffic_scripts/ipv4_sweep_ping.py index 5005345250..6c18f795c2 100755 --- a/resources/traffic_scripts/ipv4_sweep_ping.py +++ b/resources/traffic_scripts/ipv4_sweep_ping.py @@ -93,8 +93,11 @@ def main(): if tmp.chksum != chksum: raise RuntimeError( 'Invalid checksum {0} should be {1}'.format(chksum, tmp.chksum)) - recv_payload_len = ipv4.len - 20 - 8 - load = tmp['Raw'].load[0:recv_payload_len] + + if 'Raw' in icmpv4: + load = icmpv4['Raw'].load + else: + load = [] if load != data[0:echo_seq]: raise RuntimeError( 'Received ICMP payload does not match sent payload') |