MCPcopy Create free account
hub / github.com/F-Stack/f-stack / in6_tmpaddrtimer

Function in6_tmpaddrtimer

freebsd/netinet6/in6_ifattach.c:829–857  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

827}
828
829void
830in6_tmpaddrtimer(void *arg)
831{
832 CURVNET_SET((struct vnet *) arg);
833 struct nd_ifinfo *ndi;
834 u_int8_t nullbuf[8];
835 struct ifnet *ifp;
836
837 callout_reset(&V_in6_tmpaddrtimer_ch,
838 (V_ip6_temp_preferred_lifetime - V_ip6_desync_factor -
839 V_ip6_temp_regen_advance) * hz, in6_tmpaddrtimer, curvnet);
840
841 bzero(nullbuf, sizeof(nullbuf));
842 CK_STAILQ_FOREACH(ifp, &V_ifnet, if_link) {
843 if (ifp->if_afdata[AF_INET6] == NULL)
844 continue;
845 ndi = ND_IFINFO(ifp);
846 if (bcmp(ndi->randomid, nullbuf, sizeof(nullbuf)) != 0) {
847 /*
848 * We've been generating a random ID on this interface.
849 * Create a new one.
850 */
851 (void)generate_tmp_ifid(ndi->randomseed0,
852 ndi->randomseed1, ndi->randomid);
853 }
854 }
855
856 CURVNET_RESTORE();
857}
858
859static void
860in6_purgemaddrs(struct ifnet *ifp)

Callers

nothing calls this directly

Calls 2

bzeroFunction · 0.85
generate_tmp_ifidFunction · 0.85

Tested by

no test coverage detected