mirror of
https://git.FreeBSD.org/src.git
synced 2024-10-19 02:29:40 +00:00
in6: Enter the net epoch in in6_tmpaddrtimer()
We need to do so to safely traverse the ifnet list. Reviewed by: bz MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31470
This commit is contained in:
parent
eca9ac5a32
commit
8ee0826f75
@ -828,6 +828,7 @@ void
|
||||
in6_tmpaddrtimer(void *arg)
|
||||
{
|
||||
CURVNET_SET((struct vnet *) arg);
|
||||
struct epoch_tracker et;
|
||||
struct nd_ifinfo *ndi;
|
||||
u_int8_t nullbuf[8];
|
||||
struct ifnet *ifp;
|
||||
@ -837,6 +838,7 @@ in6_tmpaddrtimer(void *arg)
|
||||
V_ip6_temp_regen_advance) * hz, in6_tmpaddrtimer, curvnet);
|
||||
|
||||
bzero(nullbuf, sizeof(nullbuf));
|
||||
NET_EPOCH_ENTER(et);
|
||||
CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) {
|
||||
if (ifp->if_afdata[AF_INET6] == NULL)
|
||||
continue;
|
||||
@ -850,7 +852,7 @@ in6_tmpaddrtimer(void *arg)
|
||||
ndi->randomseed1, ndi->randomid);
|
||||
}
|
||||
}
|
||||
|
||||
NET_EPOCH_EXIT(et);
|
||||
CURVNET_RESTORE();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user