diff options
author | Kjell Wooding <kjell@cvs.openbsd.org> | 1999-02-19 20:52:23 +0000 |
---|---|---|
committer | Kjell Wooding <kjell@cvs.openbsd.org> | 1999-02-19 20:52:23 +0000 |
commit | c7db4c98c9b5d81b8dd1dc9e1219ed66f21f4e8c (patch) | |
tree | b5ea34f2bd0e5ba99d3a8c566a053d8df0967569 /sys | |
parent | 8b7bf26925706c505e8b009ffc9e7b4365f958dd (diff) |
fix definition of plen for ICMP (ping -s73 problem)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/fil.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/netinet/fil.c b/sys/netinet/fil.c index 004cd4dd9e7..adc8a0f0cd8 100644 --- a/sys/netinet/fil.c +++ b/sys/netinet/fil.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fil.c,v 1.14 1999/02/05 05:58:49 deraadt Exp $ */ +/* $OpenBSD: fil.c,v 1.15 1999/02/19 20:52:22 kjell Exp $ */ /* * Copyright (C) 1993-1998 by Darren Reed. * @@ -8,7 +8,7 @@ */ #if !defined(lint) static const char sccsid[] = "@(#)fil.c 1.36 6/5/96 (C) 1993-1996 Darren Reed"; -static const char rcsid[] = "@(#)$Id: fil.c,v 1.14 1999/02/05 05:58:49 deraadt Exp $"; +static const char rcsid[] = "@(#)$Id: fil.c,v 1.15 1999/02/19 20:52:22 kjell Exp $"; #endif #include <sys/errno.h> @@ -611,9 +611,9 @@ int out; case IPPROTO_UDP: plen = sizeof(udphdr_t); break; - /* 96 - enough for complete ICMP error IP header */ case IPPROTO_ICMP: - plen = 76 + sizeof(struct icmp); + /* need enough for complete ICMP error IP header */ + plen = ICMPERR_MAXPKTLEN - sizeof(ip_t); break; } up = MIN(hlen + plen, ip->ip_len); @@ -1137,7 +1137,7 @@ nodata: * SUCH DAMAGE. * * @(#)uipc_mbuf.c 8.2 (Berkeley) 1/4/94 - * $Id: fil.c,v 1.14 1999/02/05 05:58:49 deraadt Exp $ + * $Id: fil.c,v 1.15 1999/02/19 20:52:22 kjell Exp $ */ /* * Copy data from an mbuf chain starting "off" bytes from the beginning, |