patch-2.1.89 linux/net/ipv6/ip6_fib.c
Next file: linux/net/ipv6/ip6_output.c
Previous file: linux/net/ipv6/af_inet6.c
Back to the patch index
Back to the overall index
- Lines: 75
- Date:
Sun Mar 1 14:40:41 1998
- Orig file:
v2.1.88/linux/net/ipv6/ip6_fib.c
- Orig date:
Mon Jan 12 15:28:28 1998
diff -u --recursive --new-file v2.1.88/linux/net/ipv6/ip6_fib.c linux/net/ipv6/ip6_fib.c
@@ -45,8 +45,6 @@
static __u32 rt_sernum = 0;
-static void fib6_run_gc(unsigned long);
-
static struct timer_list ip6_fib_timer = {
NULL, NULL,
0,
@@ -421,7 +419,7 @@
(ipv6_addr_cmp(&iter->rt6i_gateway,
&rt->rt6i_gateway) == 0)) {
if (rt->rt6i_expires == 0 ||
- rt->rt6i_expires - iter->rt6i_expires > 0)
+ (long)(rt->rt6i_expires - iter->rt6i_expires) > 0)
rt->rt6i_expires = iter->rt6i_expires;
return -EEXIST;
}
@@ -457,7 +455,8 @@
{
if ((ip6_fib_timer.expires == 0) &&
(rt->rt6i_flags & (RTF_ADDRCONF | RTF_CACHE))) {
- ip6_fib_timer.expires = jiffies + ipv6_config.rt_gc_period;
+ del_timer(&ip6_fib_timer);
+ ip6_fib_timer.expires = jiffies + ip6_rt_gc_interval;
add_timer(&ip6_fib_timer);
}
}
@@ -904,7 +903,7 @@
for (rt = fn->leaf; rt;) {
if ((rt->rt6i_flags & RTF_CACHE) && atomic_read(&rt->rt6i_use) == 0) {
- if (now - rt->rt6i_tstamp > timeout) {
+ if ((long)(now - rt->rt6i_tstamp) >= timeout) {
struct rt6_info *old;
old = rt;
@@ -932,7 +931,7 @@
* Seems, radix tree walking is absolutely broken,
* but we will try in any case --ANK
*/
- if (rt->rt6i_expires && now - rt->rt6i_expires < 0) {
+ if (rt->rt6i_expires && (long)(now - rt->rt6i_expires) < 0) {
struct rt6_info *old;
old = rt;
@@ -1042,20 +1041,25 @@
}
}
-static void fib6_run_gc(unsigned long dummy)
+void fib6_run_gc(unsigned long dummy)
{
struct fib6_gc_args arg = {
- ipv6_config.rt_cache_timeout,
+ ip6_rt_gc_timeout,
0
};
+ del_timer(&ip6_fib_timer);
+
+ if (dummy)
+ arg.timeout = dummy;
+
if (fib6_walk_count == 0)
fib6_walk_tree(&ip6_routing_table, fib6_garbage_collect, &arg, 0);
else
arg.more = 1;
if (arg.more) {
- ip6_fib_timer.expires = jiffies + ipv6_config.rt_gc_period;
+ ip6_fib_timer.expires = jiffies + ip6_rt_gc_interval;
add_timer(&ip6_fib_timer);
} else {
ip6_fib_timer.expires = 0;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov