traceroute: add tests
add some basic tests for traceroute. this covers most of the flags we
can easily test; in some cases we use tcpdump to ensure the correct
packets are actually being sent.
to run the tests, we create three jails: one for the source host, one
for the destination host, and one to route packets betweem them. this
ensures we're actually testing traceroute across a routed network and
not just sending probe packets to a directly connected host.
no tests for traceroute6 are in this commit since the traceroute6 merge
into traceroute is in progress elsewhere.
Reviewed by: des, adrian
Approved by: des (mentor)
Differential Revision: https://reviews.freebsd.org/D49838
(cherry picked from commit ff8200f9b8d464d6b4cbdeaaacdc2b78d339111b)
traceroute tests: fix the test when SCTP is supported
The SCTP test assumes a default system configuration where SCTP is not
supported, so the probe packet returns an ICMP error which is displayed
as a !P response. If SCTP is supported, then something else is returned
instead (depending on exactly what probe we sent, but not an ICMP error)
and the test fails.
Since we already check the correct probes are sent using tcpdump, remove
the match for the second hop entirely.
Reported by: Jenkins
Reviewed by: des
Approved by: des (mentor)
Differential Revision: https://reviews.freebsd.org/D50336
(cherry picked from commit 4dbe268d2e7ad4f1172a174a3c55f0fdff3aaa99)