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
This commit is contained in:
tuexen 2015-05-30 20:39:19 +00:00
parent e99dc1c8d6
commit 9dca4be9f7

View File

@ -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) {