diff options
author | Florian Obser <florian@cvs.openbsd.org> | 2016-09-17 09:17:56 +0000 |
---|---|---|
committer | Florian Obser <florian@cvs.openbsd.org> | 2016-09-17 09:17:56 +0000 |
commit | eca5b256fb825890ca000e59aa0f8b37ba38b68e (patch) | |
tree | fb6c3ac3e20e36fb4d76ea571fc67fe59c2f7d29 /sbin/ping | |
parent | 5c969a5e581c4e92e4132206bbfd75c240a47c76 (diff) |
ping(8): The IPv6 header has a payload length field while IPv4 has a
length field for the whole packet. Make some room for IPv6 payload.
ping6(8): Sync to ping(8).
Diffstat (limited to 'sbin/ping')
-rw-r--r-- | sbin/ping/ping.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/ping/ping.c b/sbin/ping/ping.c index 80c477a3635..76979159464 100644 --- a/sbin/ping/ping.c +++ b/sbin/ping/ping.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ping.c,v 1.186 2016/09/17 09:16:32 florian Exp $ */ +/* $OpenBSD: ping.c,v 1.187 2016/09/17 09:17:55 florian Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -167,7 +167,7 @@ int mx_dup_ck = MAX_DUP_CHK; char rcvd_tbl[MAX_DUP_CHK / 8]; int datalen = DEFDATALEN; -u_char outpackhdr[IP_MAXPACKET]; /* Max packet size = 65535 */ +u_char outpackhdr[IP_MAXPACKET+sizeof(struct ip)]; u_char *outpack = outpackhdr+sizeof(struct ip); char BSPACE = '\b'; /* characters written for flood */ char DOT = '.'; |