-/* $OpenBSD: nd6.c,v 1.252 2022/11/23 16:57:37 kn Exp $ */
+/* $OpenBSD: nd6.c,v 1.253 2022/11/23 16:59:10 kn Exp $ */
/* $KAME: nd6.c,v 1.280 2002/06/08 19:52:07 itojun Exp $ */
/*
case ND6_LLINFO_INCOMPLETE:
if (ln->ln_asked < nd6_mmaxtries) {
ln->ln_asked++;
- nd6_llinfo_settimer(ln, ND_IFINFO(ifp)->retrans / 1000);
+ nd6_llinfo_settimer(ln, ifp->if_nd->retrans / 1000);
nd6_ns_output(ifp, NULL, &dst->sin6_addr, ln, 0);
} else {
struct mbuf *m = ln->ln_hold;
/* We need NUD */
ln->ln_asked = 1;
ln->ln_state = ND6_LLINFO_PROBE;
- nd6_llinfo_settimer(ln, ND_IFINFO(ifp)->retrans / 1000);
+ nd6_llinfo_settimer(ln, ifp->if_nd->retrans / 1000);
nd6_ns_output(ifp, &dst->sin6_addr, &dst->sin6_addr, ln, 0);
break;
case ND6_LLINFO_PROBE:
if (ln->ln_asked < nd6_umaxtries) {
ln->ln_asked++;
- nd6_llinfo_settimer(ln, ND_IFINFO(ifp)->retrans / 1000);
+ nd6_llinfo_settimer(ln, ifp->if_nd->retrans / 1000);
nd6_ns_output(ifp, &dst->sin6_addr,
&dst->sin6_addr, ln, 0);
} else {
ln->ln_state = ND6_LLINFO_REACHABLE;
if (!ND6_LLINFO_PERMANENT(ln))
- nd6_llinfo_settimer(ln, ND_IFINFO(ifp)->reachable);
+ nd6_llinfo_settimer(ln, ifp->if_nd->reachable);
out:
if_put(ifp);
}
switch (cmd) {
case SIOCGIFINFO_IN6:
NET_LOCK_SHARED();
- ndi->ndi = *ND_IFINFO(ifp);
+ ndi->ndi = *ifp->if_nd;
NET_UNLOCK_SHARED();
return (0);
case SIOCGNBRINFO_IN6:
timeout_add_sec(&nd6_slowtimo_ch, ND6_SLOWTIMER_INTERVAL);
TAILQ_FOREACH(ifp, &ifnetlist, if_list) {
- nd6if = ND_IFINFO(ifp);
+ nd6if = ifp->if_nd;
if (nd6if->basereachable && /* already initialized */
(nd6if->recalctm -= ND6_SLOWTIMER_INTERVAL) <= 0) {
/*
*/
if (!ND6_LLINFO_PERMANENT(ln) && ln->ln_asked == 0) {
ln->ln_asked++;
- nd6_llinfo_settimer(ln, ND_IFINFO(ifp)->retrans / 1000);
+ nd6_llinfo_settimer(ln, ifp->if_nd->retrans / 1000);
nd6_ns_output(ifp, NULL, &satosin6(dst)->sin6_addr, ln, 0);
}
return (EAGAIN);
-/* $OpenBSD: nd6_nbr.c,v 1.133 2022/08/29 07:51:45 bluhm Exp $ */
+/* $OpenBSD: nd6_nbr.c,v 1.134 2022/11/23 16:59:10 kn Exp $ */
/* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */
/*
rtm_send(rt, RTM_RESOLVE, 0, ifp->if_rdomain);
if (!ND6_LLINFO_PERMANENT(ln)) {
nd6_llinfo_settimer(ln,
- ND_IFINFO(ifp)->reachable);
+ ifp->if_nd->reachable);
}
} else {
ln->ln_state = ND6_LLINFO_STALE;
ln->ln_byhint = 0;
if (!ND6_LLINFO_PERMANENT(ln)) {
nd6_llinfo_settimer(ln,
- ND_IFINFO(ifp)->reachable);
+ ifp->if_nd->reachable);
}
} else {
if (lladdr && llchange) {
dp->dad_ns_icount = dp->dad_na_icount = 0;
dp->dad_ns_ocount = dp->dad_ns_tcount = 0;
nd6_dad_ns_output(dp, ifa);
- nd6_dad_starttimer(dp, ND_IFINFO(ifa->ifa_ifp)->retrans);
+ nd6_dad_starttimer(dp, ifa->ifa_ifp->if_nd->retrans);
}
/*
* We have more NS to go. Send NS packet for DAD.
*/
nd6_dad_ns_output(dp, ifa);
- nd6_dad_starttimer(dp, ND_IFINFO(ifa->ifa_ifp)->retrans);
+ nd6_dad_starttimer(dp, ifa->ifa_ifp->if_nd->retrans);
} else {
/*
* We have transmitted sufficient number of DAD packets.