summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_subr.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2003-02-25 14:08:41 +0000
committerrwatson <rwatson@FreeBSD.org>2003-02-25 14:08:41 +0000
commit97f9a00e9eada7e6909290a7fb4c9e31f87769a5 (patch)
tree5e0891ee4d8be47e81d5bac34cccf9a47680b9ca /sys/netinet/tcp_subr.c
parent67b154de1255fcefa1ebc9f0276d36e4777fa7a5 (diff)
downloadFreeBSD-src-97f9a00e9eada7e6909290a7fb4c9e31f87769a5.zip
FreeBSD-src-97f9a00e9eada7e6909290a7fb4c9e31f87769a5.tar.gz
When generating a TCP response to a connection, not only test if the
tcpcb is NULL, but also its connected inpcb, since we now allow elements of a TCP connection to hang around after other state, such as the socket, has been recycled. Tested by: dcs Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
Diffstat (limited to 'sys/netinet/tcp_subr.c')
-rw-r--r--sys/netinet/tcp_subr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index f6708b3..d92cbf5 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -484,7 +484,7 @@ tcp_respond(tp, ipgen, th, m, ack, seq, flags)
m->m_pkthdr.len = tlen;
m->m_pkthdr.rcvif = (struct ifnet *) 0;
#ifdef MAC
- if (tp != NULL) {
+ if (tp != NULL && tp->t_inpcb != NULL) {
/*
* Packet is associated with a socket, so allow the
* label of the response to reflect the socket label.
OpenPOWER on IntegriCloud