summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/in6_src.c
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2008-07-09 16:33:21 +0000
committerbz <bz@FreeBSD.org>2008-07-09 16:33:21 +0000
commitc0ef832fd278f80304905d075e4657c1a92b196b (patch)
tree5aacd0536234cf103364b2048ed3f01e30a5121d /sys/netinet6/in6_src.c
parent754034c5cf572b6def935dfa55606273daf042c8 (diff)
downloadFreeBSD-src-c0ef832fd278f80304905d075e4657c1a92b196b.zip
FreeBSD-src-c0ef832fd278f80304905d075e4657c1a92b196b.tar.gz
Document required locking in in6_sleectsrc() in case an inp is
passed in by adding an assert. Requested by: rwatson Reviewed by: rwatson
Diffstat (limited to 'sys/netinet6/in6_src.c')
-rw-r--r--sys/netinet6/in6_src.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c
index 934ff15..ffc4c63 100644
--- a/sys/netinet6/in6_src.c
+++ b/sys/netinet6/in6_src.c
@@ -188,10 +188,12 @@ in6_selectsrc(struct sockaddr_in6 *dstsock, struct ip6_pktopts *opts,
if (ifpp)
*ifpp = NULL;
- if (inp != NULL)
+ if (inp != NULL) {
+ INP_LOCK_ASSERT(inp);
mopts = inp->in6p_moptions;
- else
+ } else {
mopts = NULL;
+ }
/*
* If the source address is explicitly specified by the caller,
OpenPOWER on IntegriCloud