From c7db4c98c9b5d81b8dd1dc9e1219ed66f21f4e8c Mon Sep 17 00:00:00 2001 From: Kjell Wooding Date: Fri, 19 Feb 1999 20:52:23 +0000 Subject: fix definition of plen for ICMP (ping -s73 problem) --- sys/netinet/fil.c | 10 +++++----- 1 file 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 @@ -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, -- cgit v1.2.3