}
r->next = net->routes;
net->routes = r;
- if (!r &&
- table->gc_counter++ >= table->config->gc_max_ops &&
- table->gc_time + table->config->gc_min_time <= now)
- ev_schedule(table->gc_event);
}
+ else if (table->gc_counter++ >= table->config->gc_max_ops &&
+ table->gc_time + table->config->gc_min_time <= now)
+ ev_schedule(table->gc_event);
}
if (new) /* Link in the new non-optimal route */
{
t->gc_event = ev_new(p);
t->gc_event->hook = rt_gc;
t->gc_event->data = t;
+ t->gc_time = now;
}
}
}
}
FIB_ITERATE_END(f);
- DBG("Pruned %d of %d routes and %d of %d networks\n", rcnt, rdel, ncnt, ndel);
+ DBG("Pruned %d of %d routes and %d of %d networks\n", rdel, rcnt, ndel, ncnt);
#ifdef DEBUGGING
fib_check(&tab->fib);
#endif
cf_define_symbol(s, SYM_TABLE, c);
c->name = s->name;
add_tail(&new_config->tables, &c->n);
- c->gc_max_ops = 100;
+ c->gc_max_ops = 1000;
c->gc_min_time = 5;
return c;
}