summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
authorae <ae@FreeBSD.org>2012-11-14 17:23:48 +0000
committerae <ae@FreeBSD.org>2012-11-14 17:23:48 +0000
commitd80ce03f42a9c9f75eca4006d016925f01df089d (patch)
tree40c8dbb279a98aee4393a7bd4584cae0df6d9a7d /sys/netinet6
parent42ab5bd8d7a31d757049c8256f197bf48d5147d4 (diff)
downloadFreeBSD-src-d80ce03f42a9c9f75eca4006d016925f01df089d.zip
FreeBSD-src-d80ce03f42a9c9f75eca4006d016925f01df089d.tar.gz
SCOPE6_LOCK protects V_sid_default, no need to acquire it without
any access to V_sid_default. Sponsored by: Yandex LLC MFC after: 1 week
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/scope6.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/sys/netinet6/scope6.c b/sys/netinet6/scope6.c
index 76f2c5b..f8dd8d1 100644
--- a/sys/netinet6/scope6.c
+++ b/sys/netinet6/scope6.c
@@ -139,7 +139,6 @@ scope6_set(struct ifnet *ifp, struct scope6_id *idlist)
* interface addresses, routing table entries, PCB entries...
*/
- SCOPE6_LOCK();
for (i = 0; i < 16; i++) {
if (idlist->s6id_list[i] &&
idlist->s6id_list[i] != sid->s6id_list[i]) {
@@ -150,7 +149,6 @@ scope6_set(struct ifnet *ifp, struct scope6_id *idlist)
if (i == IPV6_ADDR_SCOPE_INTFACELOCAL &&
idlist->s6id_list[i] != ifp->if_index) {
IF_AFDATA_UNLOCK(ifp);
- SCOPE6_UNLOCK();
return (EINVAL);
}
@@ -163,7 +161,6 @@ scope6_set(struct ifnet *ifp, struct scope6_id *idlist)
* safety in later use.
*/
IF_AFDATA_UNLOCK(ifp);
- SCOPE6_UNLOCK();
return (EINVAL);
}
@@ -175,7 +172,6 @@ scope6_set(struct ifnet *ifp, struct scope6_id *idlist)
sid->s6id_list[i] = idlist->s6id_list[i];
}
}
- SCOPE6_UNLOCK();
IF_AFDATA_UNLOCK(ifp);
return (error);
@@ -193,9 +189,7 @@ scope6_get(struct ifnet *ifp, struct scope6_id *idlist)
return (EINVAL);
}
- SCOPE6_LOCK();
*idlist = *sid;
- SCOPE6_UNLOCK();
IF_AFDATA_UNLOCK(ifp);
return (0);
@@ -442,8 +436,6 @@ in6_setscope(struct in6_addr *in6, struct ifnet *ifp, u_int32_t *ret_id)
}
scope = in6_addrscope(in6);
-
- SCOPE6_LOCK();
switch (scope) {
case IPV6_ADDR_SCOPE_INTFACELOCAL: /* should be interface index */
zoneid = sid->s6id_list[IPV6_ADDR_SCOPE_INTFACELOCAL];
@@ -465,7 +457,6 @@ in6_setscope(struct in6_addr *in6, struct ifnet *ifp, u_int32_t *ret_id)
zoneid = 0; /* XXX: treat as global. */
break;
}
- SCOPE6_UNLOCK();
IF_AFDATA_UNLOCK(ifp);
if (ret_id != NULL)
OpenPOWER on IntegriCloud