svn commit: r283786 - head/contrib/traceroute
Michael Tuexen
tuexen at FreeBSD.org
Sat May 30 20:39:21 UTC 2015
Author: tuexen
Date: Sat May 30 20:39:19 2015
New Revision: 283786
URL: https://svnweb.freebsd.org/changeset/base/283786
Log:
There is no payload anymore. So compute the minimum packet length
correctly and use 40 as the default (if the minumum allows it), as
specified in the man page.
MFC after: 3 days
Modified:
head/contrib/traceroute/traceroute.c
Modified: head/contrib/traceroute/traceroute.c
==============================================================================
--- head/contrib/traceroute/traceroute.c Sat May 30 19:52:28 2015 (r283785)
+++ head/contrib/traceroute/traceroute.c Sat May 30 20:39:19 2015 (r283786)
@@ -669,8 +669,11 @@ main(int argc, char **argv)
if (lsrr > 0)
optlen = (lsrr + 1) * sizeof(gwlist[0]);
- minpacket = sizeof(*outip) + proto->hdrlen + sizeof(struct outdata) + optlen;
- packlen = minpacket; /* minimum sized packet */
+ minpacket = sizeof(*outip) + proto->hdrlen + optlen;
+ if (minpacket > 40)
+ packlen = minpacket;
+ else
+ packlen = 40;
/* Process destination and optional packet size */
switch (argc - optind) {
More information about the svn-src-head
mailing list