summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2004-01-28 15:01:39 +0000
committerume <ume@FreeBSD.org>2004-01-28 15:01:39 +0000
commit62d98ccd699ff117e5eb0fb72d70e9ed45d5a9d7 (patch)
tree0af10f3b30d29f7514e24a414e9590aceb85c3cb /sys/netinet6
parent36365b78200a69d1976ac8823cc63f2ad36ae864 (diff)
downloadFreeBSD-src-62d98ccd699ff117e5eb0fb72d70e9ed45d5a9d7.zip
FreeBSD-src-62d98ccd699ff117e5eb0fb72d70e9ed45d5a9d7.tar.gz
protect access to ifnet structure with mutex.
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/nd6.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index 14f24c1..4f0c1ba 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -1795,6 +1795,7 @@ nd6_slowtimo(ignored_arg)
callout_reset(&nd6_slowtimo_ch, ND6_SLOWTIMER_INTERVAL * hz,
nd6_slowtimo, NULL);
+ IFNET_RLOCK();
for (ifp = TAILQ_FIRST(&ifnet); ifp; ifp = TAILQ_NEXT(ifp, if_list)) {
nd6if = ND_IFINFO(ifp);
if (nd6if->basereachable && /* already initialized */
@@ -1809,6 +1810,7 @@ nd6_slowtimo(ignored_arg)
nd6if->reachable = ND_COMPUTE_RTIME(nd6if->basereachable);
}
}
+ IFNET_RUNLOCK();
splx(s);
}
OpenPOWER on IntegriCloud