Implemented `route last modified' time.
This commit is contained in:
parent
2a900b1b15
commit
570ce189d7
1 changed files with 2 additions and 2 deletions
|
@ -80,7 +80,6 @@ rte_get_temp(rta *a)
|
||||||
e->attrs = a;
|
e->attrs = a;
|
||||||
e->flags = 0;
|
e->flags = 0;
|
||||||
e->pref = a->proto->preference;
|
e->pref = a->proto->preference;
|
||||||
e->lastmod = 0; /* FIXME */
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -200,6 +199,7 @@ rte_update(net *net, struct proto *p, rte *new)
|
||||||
}
|
}
|
||||||
if (old)
|
if (old)
|
||||||
rte_free(old);
|
rte_free(old);
|
||||||
|
new->lastmod = now;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -207,7 +207,7 @@ rte_dump(net *n, rte *e)
|
||||||
{
|
{
|
||||||
if (n)
|
if (n)
|
||||||
debug("%1I/%2d ", n->n.prefix, n->n.pxlen);
|
debug("%1I/%2d ", n->n.prefix, n->n.pxlen);
|
||||||
debug("PF=%02x pref=%d lm=%d ", e->pflags, e->pref, e->lastmod);
|
debug("PF=%02x pref=%d lm=%d ", e->pflags, e->pref, now-e->lastmod);
|
||||||
rta_dump(e->attrs);
|
rta_dump(e->attrs);
|
||||||
if (e->flags & REF_CHOSEN)
|
if (e->flags & REF_CHOSEN)
|
||||||
debug(" [*]");
|
debug(" [*]");
|
||||||
|
|
Loading…
Reference in a new issue