summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2016-05-30 23:37:37 +0000
committerdlg <dlg@openbsd.org>2016-05-30 23:37:37 +0000
commitcc0585f2202a353f57c8f6ae00889a31d2dac40f (patch)
tree63ad3f2cbc860eecbfe2ecff744a7c1a27b2e00b
parentSet pppoe(4) control frames to high (NC, "network control") (diff)
downloadwireguard-openbsd-cc0585f2202a353f57c8f6ae00889a31d2dac40f.tar.xz
wireguard-openbsd-cc0585f2202a353f57c8f6ae00889a31d2dac40f.zip
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@
-rw-r--r--sys/netinet6/nd6.c23
-rw-r--r--sys/netinet6/nd6.h3
2 files changed, 3 insertions, 23 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) {
diff --git a/sys/netinet6/nd6.h b/sys/netinet6/nd6.h
index 80e91781fa9..e8cfdb11ec0 100644
--- a/sys/netinet6/nd6.h
+++ b/sys/netinet6/nd6.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: nd6.h,v 1.58 2016/03/30 10:13:14 mpi Exp $ */
+/* $OpenBSD: nd6.h,v 1.59 2016/05/30 23:37:37 dlg Exp $ */
/* $KAME: nd6.h,v 1.95 2002/06/08 11:31:06 itojun Exp $ */
/*
@@ -150,7 +150,6 @@ struct llinfo_nd6 {
short ln_state; /* reachability state */
short ln_router; /* 2^0: ND6 router bit */
- long ln_ntick;
struct timeout ln_timer_ch;
};