summaryrefslogtreecommitdiffstats
path: root/sys/net/if_stf.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2009-06-26 00:45:20 +0000
committerrwatson <rwatson@FreeBSD.org>2009-06-26 00:45:20 +0000
commit3dffb5419c2e44b4e7e028194f1c3828fad6a7dc (patch)
treeb2ffd162276a5f916dc0ad8aa9fdb57250c5ad5f /sys/net/if_stf.c
parentc4ac6ab020126b381316fa8dcb627571af2683c8 (diff)
downloadFreeBSD-src-3dffb5419c2e44b4e7e028194f1c3828fad6a7dc.zip
FreeBSD-src-3dffb5419c2e44b4e7e028194f1c3828fad6a7dc.tar.gz
Update if_stf and if_tun to use if_addr_rlock()/if_addr_runlock() rather
than IF_ADDR_LOCK()/IF_ADDR_UNLOCK() when iterating ifp->if_addrhead. MFC after: 6 weeks
Diffstat (limited to 'sys/net/if_stf.c')
-rw-r--r--sys/net/if_stf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/if_stf.c b/sys/net/if_stf.c
index 12ce174..24e5ca5 100644
--- a/sys/net/if_stf.c
+++ b/sys/net/if_stf.c
@@ -384,7 +384,7 @@ stf_getsrcifa6(ifp)
struct sockaddr_in6 *sin6;
struct in_addr in;
- IF_ADDR_LOCK(ifp);
+ if_addr_rlock(ifp);
TAILQ_FOREACH(ia, &ifp->if_addrhead, ifa_link) {
if (ia->ifa_addr->sa_family != AF_INET6)
continue;
@@ -400,10 +400,10 @@ stf_getsrcifa6(ifp)
continue;
ifa_ref(ia);
- IF_ADDR_UNLOCK(ifp);
+ if_addr_runlock(ifp);
return (struct in6_ifaddr *)ia;
}
- IF_ADDR_UNLOCK(ifp);
+ if_addr_runlock(ifp);
return NULL;
}
OpenPOWER on IntegriCloud