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:
parent
e99dc1c8d6
commit
9dca4be9f7
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user