pf tests: Fix pft_ping.py to work with scapy 2.3.3

Scapy requires the Raw payload to be a string, which was not the case. This
caused the pft_ping.py script to fail, which in turn caused the test to fail.
This commit is contained in:
Kristof Provost 2018-01-09 19:02:42 +00:00
parent dc8ab16ecc
commit a60f45a0d5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=327735

View File

@ -79,7 +79,7 @@ def ping(send_if, dst_ip, args):
ether = sp.Ether()
ip = sp.IP(dst=dst_ip)
icmp = sp.ICMP(type='echo-request')
raw = sp.Raw(PAYLOAD_MAGIC)
raw = sp.Raw(str(PAYLOAD_MAGIC))
if args.send_tos:
ip.tos = int(args.send_tos[0])