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
This commit is contained in:
parent
a4910cd21c
commit
9327ee33bf
@ -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.
|
||||
|
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user