Fix the length of probe packets when using UDP.

Since https://svnweb.freebsd.org/changeset/base/365378 a raw socket is
used for sending UDP probe packets instead of a UDP socket. So don't
compensate for the UDP header anymore.
This commit is contained in:
Michael Tuexen 2020-09-12 11:24:36 +00:00
parent 2d0fb1b3c1
commit 3303e9bc22
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=365658

View File

@ -677,8 +677,6 @@ main(int argc, char *argv[])
minlen, MAXPACKET);
exit(1);
}
if (useproto == IPPROTO_UDP)
datalen -= sizeof(struct udphdr);
if ((useproto == IPPROTO_SCTP) && (datalen & 3)) {
fprintf(stderr,
"traceroute6: packet size must be a multiple of 4.\n");