Document the undocumented assumption that at least one of the PCB

pointer and incoming mbuf pointer will be non-NULL in tcp_respond().
This is relied on by the MAC code for correctness, as well as
existing code.

Obtained from:	TrustedBSD PRoject
Sponsored by:	DARPA, NAI Labs
This commit is contained in:
Robert Watson 2002-08-01 03:54:43 +00:00
parent 0070e096d7
commit d00e44fb4a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=101137
2 changed files with 4 additions and 0 deletions

View File

@ -347,6 +347,8 @@ tcp_respond(tp, ipgen, th, m, ack, seq, flags)
#endif /* INET6 */
int ipflags = 0;
KASSERT(tp != NULL || m != NULL, ("tcp_respond: tp and m both NULL"));
#ifdef INET6
isipv6 = IP_VHL_V(((struct ip *)ipgen)->ip_vhl) == 6;
ip6 = ipgen;

View File

@ -347,6 +347,8 @@ tcp_respond(tp, ipgen, th, m, ack, seq, flags)
#endif /* INET6 */
int ipflags = 0;
KASSERT(tp != NULL || m != NULL, ("tcp_respond: tp and m both NULL"));
#ifdef INET6
isipv6 = IP_VHL_V(((struct ip *)ipgen)->ip_vhl) == 6;
ip6 = ipgen;