summaryrefslogtreecommitdiff
path: root/sys/netinet6/nd6.c
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2016-05-30 23:37:38 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2016-05-30 23:37:38 +0000
commite9a7d006cff286796f7a7c27bb03d5b938fe8193 (patch)
treebfaa0a9e9c4bd5bbbce8abcac766284352e34512 /sys/netinet6/nd6.c
parenta76214f441401dc88bb5bf703141a83747c23b09 (diff)
remove code compensating for the "short" range of timeouts.
the nd6 code for managing expiries is never asked to handle intervals greater than what timeouts can handle, so we dont need to overcompensate. the code was also incorrect by using a long, which isnt that long on ILP32 machines. ok mpi@ millert@ benno@
Diffstat (limited to 'sys/netinet6/nd6.c')
-rw-r--r--sys/netinet6/nd6.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index 11f5fdb1419..e80e24228ec 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nd6.c,v 1.179 2016/05/17 08:29:14 mpi Exp $ */
+/* $OpenBSD: nd6.c,v 1.180 2016/05/30 23:37:37 dlg Exp $ */
/* $KAME: nd6.c,v 1.280 2002/06/08 19:52:07 itojun Exp $ */
/*
@@ -312,17 +312,10 @@ nd6_llinfo_settimer(struct llinfo_nd6 *ln, long tick)
if (tick < 0) {
ln->ln_expire = 0;
- ln->ln_ntick = 0;
timeout_del(&ln->ln_timer_ch);
} else {
ln->ln_expire = time_second + tick / hz;
- if (tick > INT_MAX) {
- ln->ln_ntick = tick - INT_MAX;
- timeout_add(&ln->ln_timer_ch, INT_MAX);
- } else {
- ln->ln_ntick = 0;
- timeout_add(&ln->ln_timer_ch, tick);
- }
+ timeout_add(&ln->ln_timer_ch, tick);
}
splx(s);
@@ -342,18 +335,6 @@ nd6_llinfo_timer(void *arg)
ln = (struct llinfo_nd6 *)arg;
- if (ln->ln_ntick > 0) {
- if (ln->ln_ntick > INT_MAX) {
- ln->ln_ntick -= INT_MAX;
- nd6_llinfo_settimer(ln, INT_MAX);
- } else {
- ln->ln_ntick = 0;
- nd6_llinfo_settimer(ln, ln->ln_ntick);
- }
- splx(s);
- return;
- }
-
if ((rt = ln->ln_rt) == NULL)
panic("ln->ln_rt == NULL");
if ((ifp = if_get(rt->rt_ifidx)) == NULL) {