diff options
Diffstat (limited to 'sys/netinet/ip_icmp.c')
-rw-r--r-- | sys/netinet/ip_icmp.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index 38e287f1582..a352aec2e7d 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_icmp.c,v 1.26 2000/09/26 01:02:25 angelos Exp $ */ +/* $OpenBSD: ip_icmp.c,v 1.27 2000/10/09 14:39:46 provos Exp $ */ /* $NetBSD: ip_icmp.c,v 1.19 1996/02/13 23:42:22 christos Exp $ */ /* @@ -71,6 +71,7 @@ didn't get a copy, you may request one from <license@ipv6.nrl.navy.mil>. #include <netinet/ip_icmp.h> #include <netinet/ip_var.h> #include <netinet/icmp_var.h> +#include <netinet/in_pcb.h> #include <machine/stdarg.h> @@ -741,12 +742,16 @@ icmp_mtudisc(icp) struct sockaddr *dst = sintosa(&icmpsrc); u_long mtu = ntohs(icp->icmp_nextmtu); /* Why a long? IPv6 */ int error; - + extern struct inpcbtable tcbtable; + /* Table of common MTUs: */ static u_short mtu_table[] = {65535, 65280, 32000, 17914, 9180, 8166, 4352, 2002, 1492, 1006, 508, 296, 68, 0}; + if (!in_pcbconnected(&tcbtable, sintosa(&icmpsrc))) + return; + rt = rtalloc1(dst, 1); if (rt == 0) return; |