summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_output.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2003-11-08 23:03:29 +0000
committersam <sam@FreeBSD.org>2003-11-08 23:03:29 +0000
commit854b820d7c80d857dea648c6ae35e8cfeb1f4a78 (patch)
tree2cef2ca12e81dbbff3b7698e85cde6bf08c6ced4 /sys/netinet/ip_output.c
parent111b711b8209ee948e0b5940a2ff5b14b024e273 (diff)
downloadFreeBSD-src-854b820d7c80d857dea648c6ae35e8cfeb1f4a78.zip
FreeBSD-src-854b820d7c80d857dea648c6ae35e8cfeb1f4a78.tar.gz
assert optional inpcb is passed in locked
Supported by: FreeBSD Foundation
Diffstat (limited to 'sys/netinet/ip_output.c')
-rw-r--r--sys/netinet/ip_output.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index 0831784..b23e1e1 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -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 *);
OpenPOWER on IntegriCloud