svn commit: r191073 - head/sys/netinet
Randall Stewart
rrs at FreeBSD.org
Tue Apr 14 19:20:29 UTC 2009
Author: rrs
Date: Tue Apr 14 19:20:27 2009
New Revision: 191073
URL: http://svn.freebsd.org/changeset/base/191073
Log:
Add missing address lock when we look at the ifa list
Modified:
head/sys/netinet/sctp_bsd_addr.c
Modified: head/sys/netinet/sctp_bsd_addr.c
==============================================================================
--- head/sys/netinet/sctp_bsd_addr.c Tue Apr 14 19:11:02 2009 (r191072)
+++ head/sys/netinet/sctp_bsd_addr.c Tue Apr 14 19:20:27 2009 (r191073)
@@ -189,11 +189,11 @@ sctp_is_desired_interface_type(struct if
}
+
+
static void
sctp_init_ifns_for_vrf(int vrfid)
{
-
-
/*
* Here we must apply ANY locks needed by the IFN we access and also
* make sure we lock any IFA that exists as we float through the
@@ -206,8 +206,8 @@ sctp_init_ifns_for_vrf(int vrfid)
uint32_t ifa_flags;
TAILQ_FOREACH(ifn, &MODULE_GLOBAL(MOD_NET, ifnet), if_list) {
+ IF_ADDR_LOCK(ifn);
TAILQ_FOREACH(ifa, &ifn->if_addrlist, ifa_list) {
-
if (ifa->ifa_addr == NULL) {
continue;
}
@@ -248,10 +248,10 @@ sctp_init_ifns_for_vrf(int vrfid)
sctp_ifa->localifa_flags &= ~SCTP_ADDR_DEFER_USE;
}
}
+ IF_ADDR_UNLOCK(ifn);
}
}
-
void
sctp_init_vrf_list(int vrfid)
{
More information about the svn-src-head
mailing list