summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsommerfeld <sommerfeld@NetBSD.org>2000-08-22 16:02:16 +0000
committersommerfeld <sommerfeld@NetBSD.org>2000-08-22 16:02:16 +0000
commit867ca7767af810ddeaed4ed345aa4eaa09fe6f74 (patch)
tree637f5aa17fb0c848d578cc72a885168b22e883d3
parentfb119983f322b69d00773e832f1037324592f430 (diff)
Fill in next mtu field of NEEDFRAG ICMP error message.
From Marc Horowitz, pr10857
-rw-r--r--sys/netinet/ip_fil.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/netinet/ip_fil.c b/sys/netinet/ip_fil.c
index 96b2f8ee34d..b080bd1e1da 100644
--- a/sys/netinet/ip_fil.c
+++ b/sys/netinet/ip_fil.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_fil.c,v 1.58 2000/08/09 21:00:41 veego Exp $ */
+/* $NetBSD: ip_fil.c,v 1.59 2000/08/22 16:02:16 sommerfeld Exp $ */
/*
* Copyright (C) 1993-2000 by Darren Reed.
@@ -9,7 +9,7 @@
*/
#if !defined(lint)
#if defined(__NetBSD__)
-static const char rcsid[] = "$NetBSD: ip_fil.c,v 1.58 2000/08/09 21:00:41 veego Exp $";
+static const char rcsid[] = "$NetBSD: ip_fil.c,v 1.59 2000/08/22 16:02:16 sommerfeld Exp $";
#else
static const char sccsid[] = "@(#)ip_fil.c 2.41 6/5/96 (C) 1993-2000 Darren Reed";
static const char rcsid[] = "@(#)Id: ip_fil.c,v 2.42.2.15 2000/08/05 14:49:08 darrenr Exp";
@@ -1216,6 +1216,9 @@ int dst;
icmp->icmp_type = type;
icmp->icmp_code = fin->fin_icode;
icmp->icmp_cksum = 0;
+ if (type == ICMP_UNREACH &&
+ fin->fin_icode == ICMP_UNREACH_NEEDFRAG && ifp)
+ icmp->icmp_nextmtu = htons(((struct ifnet *) ifp)->if_mtu);
if (avail) {
bcopy((char *)oip, (char *)&icmp->icmp_ip, MIN(ohlen, avail));
avail -= MIN(ohlen, avail);