-/* $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 $ */
/*
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);
}
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;
splx(s);
break;
}
- expire = ln->ln_expire;
+ expire = ln->ln_rt->rt_expire;
if (expire != 0) {
expire -= time_uptime;
expire += time_second;
-/* $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 $ */
/*
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 */
};
#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 */