Commit c6ed5a0f authored by Ondřej Zajíček's avatar Ondřej Zajíček

Babel: Do not maintain feasibility distance for our own routes

We do not need to maintain feasibility distances for our own router
ID (we ignore the updates anyway). Not doing so makes the routes be
garbage collected sooner when export filters change.
Signed-off-by: Toke Høiland-Jørgensen's avatarToke Høiland-Jørgensen <toke@toke.dk>
parent 0f673666
...@@ -788,16 +788,21 @@ babel_send_update(struct babel_iface *ifa, bird_clock_t changed) ...@@ -788,16 +788,21 @@ babel_send_update(struct babel_iface *ifa, bird_clock_t changed)
msg.update.prefix = e->n.prefix; msg.update.prefix = e->n.prefix;
msg.update.router_id = r->router_id; msg.update.router_id = r->router_id;
/* Update feasibility distance */ babel_enqueue(&msg, ifa);
struct babel_source *s = babel_get_source(e, r->router_id);
s->expires = now + BABEL_GARBAGE_INTERVAL; /* Update feasibility distance for redistributed routes */
if ((msg.update.seqno > s->seqno) || if (!OUR_ROUTE(r))
((msg.update.seqno == s->seqno) && (msg.update.metric < s->metric)))
{ {
s->seqno = msg.update.seqno; struct babel_source *s = babel_get_source(e, r->router_id);
s->metric = msg.update.metric; s->expires = now + BABEL_GARBAGE_INTERVAL;
if ((msg.update.seqno > s->seqno) ||
((msg.update.seqno == s->seqno) && (msg.update.metric < s->metric)))
{
s->seqno = msg.update.seqno;
s->metric = msg.update.metric;
}
} }
babel_enqueue(&msg, ifa);
} }
FIB_WALK_END; FIB_WALK_END;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment