summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorsuz <suz@FreeBSD.org>2004-10-06 03:32:26 +0000
committersuz <suz@FreeBSD.org>2004-10-06 03:32:26 +0000
commit7871c65cf0044274ba81789ed65bf64e0f47112a (patch)
treef714ef1d42be7574b9e1d01a9930fb1de29ac9e0 /sys
parentb5798c745b8d0b1e503936f6caafc1c0085b8df5 (diff)
downloadFreeBSD-src-7871c65cf0044274ba81789ed65bf64e0f47112a.zip
FreeBSD-src-7871c65cf0044274ba81789ed65bf64e0f47112a.tar.gz
fixed too delayed routing cache expiry. (tvtohz() converts a time interval to ticks, whereas hzto() converts an absolute time to ticks)
Obtained from: KAME
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet6/in6_rmx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet6/in6_rmx.c b/sys/netinet6/in6_rmx.c
index b68852d..c495811 100644
--- a/sys/netinet6/in6_rmx.c
+++ b/sys/netinet6/in6_rmx.c
@@ -367,7 +367,7 @@ in6_rtqtimo(void *rock)
}
atv.tv_usec = 0;
- atv.tv_sec = arg.nextstop;
+ atv.tv_sec = arg.nextstop - time_second;
callout_reset(&rtq_timer, tvtohz(&atv), in6_rtqtimo, rock);
}
@@ -418,10 +418,10 @@ in6_mtutimo(void *rock)
RADIX_NODE_HEAD_UNLOCK(rnh);
atv.tv_usec = 0;
- atv.tv_sec = arg.nextstop;
- if (atv.tv_sec < time_second) {
+ atv.tv_sec = arg.nextstop - time_second;
+ if (atv.tv_sec < 0) {
printf("invalid mtu expiration time on routing table\n");
- arg.nextstop = time_second + 30; /* last resort */
+ arg.nextstop = 30; /* last resort */
}
callout_reset(&rtq_mtutimer, tvtohz(&atv), in6_mtutimo, rock);
}
OpenPOWER on IntegriCloud