summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/uts/common/inet/tcp/tcp_input.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/usr/src/uts/common/inet/tcp/tcp_input.c b/usr/src/uts/common/inet/tcp/tcp_input.c
index 831ebc7ba5..b53acf4b1d 100644
--- a/usr/src/uts/common/inet/tcp/tcp_input.c
+++ b/usr/src/uts/common/inet/tcp/tcp_input.c
@@ -21,6 +21,7 @@
/*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, Joyent, Inc. All rights reserved.
*/
/* This file contains all TCP input processing functions. */
@@ -5424,6 +5425,16 @@ tcp_icmp_input(void *arg1, mblk_t *mp, void *arg2, ip_recv_attr_t *ira)
ASSERT((MBLKL(mp) >= sizeof (ipha_t)));
/*
+ * It's possible that we've gotten here, but the TCP state is closed and
+ * we no longer have a conn_t. In that case, we should just drop the
+ * icmp packet
+ */
+ if (tcp->tcp_state == TCPS_CLOSED) {
+ freemsg(mp);
+ return;
+ }
+
+ /*
* Verify IP version. Anything other than IPv4 or IPv6 packet is sent
* upstream. ICMPv6 is handled in tcp_icmp_error_ipv6.
*/