assert optional inpcb is passed in locked

Supported by:	FreeBSD Foundation
This commit is contained in:
sam 2003-11-08 23:03:29 +00:00
parent 111b711b82
commit 854b820d7c

View File

@ -206,6 +206,8 @@ ip_output(struct mbuf *m0, struct mbuf *opt, struct route *ro,
KASSERT(ro != NULL, ("ip_output: no route, proto %d",
mtod(m, struct ip *)->ip_p));
#endif
if (inp != NULL)
INP_LOCK_ASSERT(inp);
if (args.rule != NULL) { /* dummynet already saw us */
ip = mtod(m, struct ip *);