diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet6/nd6.c | 10 | ||||
-rw-r--r-- | sys/netinet6/nd6.h | 5 |
2 files changed, 7 insertions, 8 deletions
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index 01383bc63c0..d7d7480dfbb 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nd6.c,v 1.186 2016/06/15 11:49:34 mpi Exp $ */ +/* $OpenBSD: nd6.c,v 1.187 2016/07/13 01:51:22 dlg Exp $ */ /* $KAME: nd6.c,v 1.280 2002/06/08 19:52:07 itojun Exp $ */ /* @@ -311,10 +311,10 @@ nd6_llinfo_settimer(struct llinfo_nd6 *ln, int secs) s = splsoftnet(); if (secs < 0) { - ln->ln_expire = 0; + ln->ln_rt->rt_expire = 0; timeout_del(&ln->ln_timer_ch); } else { - ln->ln_expire = time_uptime + secs; + ln->ln_rt->rt_expire = time_uptime + secs; timeout_add_sec(&ln->ln_timer_ch, secs); } @@ -981,7 +981,7 @@ nd6_rtrequest(struct ifnet *ifp, int req, struct rtentry *rt) if (req == RTM_ADD) { /* * gate should have some valid AF_LINK entry, - * and ln->ln_expire should have some lifetime + * and ln expire should have some lifetime * which is specified by ndp command. */ ln->ln_state = ND6_LLINFO_REACHABLE; @@ -1200,7 +1200,7 @@ nd6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp) splx(s); break; } - expire = ln->ln_expire; + expire = ln->ln_rt->rt_expire; if (expire != 0) { expire -= time_uptime; expire += time_second; diff --git a/sys/netinet6/nd6.h b/sys/netinet6/nd6.h index 44bce18a0ca..02a7924aae6 100644 --- a/sys/netinet6/nd6.h +++ b/sys/netinet6/nd6.h @@ -1,4 +1,4 @@ -/* $OpenBSD: nd6.h,v 1.62 2016/06/15 11:49:34 mpi Exp $ */ +/* $OpenBSD: nd6.h,v 1.63 2016/07/13 01:51:22 dlg Exp $ */ /* $KAME: nd6.h,v 1.95 2002/06/08 11:31:06 itojun Exp $ */ /* @@ -144,7 +144,6 @@ struct llinfo_nd6 { TAILQ_ENTRY(llinfo_nd6) ln_list; struct rtentry *ln_rt; struct mbuf *ln_hold; /* last packet until resolved/timeout */ - time_t ln_expire; /* lifetime for NDP state transition */ long ln_asked; /* number of queries already sent for addr */ int ln_byhint; /* # of times we made it reachable by UL hint */ short ln_state; /* reachability state */ @@ -154,7 +153,7 @@ struct llinfo_nd6 { }; #define ND6_IS_LLINFO_PROBREACH(n) ((n)->ln_state > ND6_LLINFO_INCOMPLETE) -#define ND6_LLINFO_PERMANENT(n) ((n)->ln_expire == 0) +#define ND6_LLINFO_PERMANENT(n) ((n)->ln_rt->rt_expire == 0) /* node constants */ #define MAX_REACHABLE_TIME 3600000 /* msec */ |