[PATCH v3] Babel: Add option to support ecmp routes
dxld at darkboxed.org
dxld at darkboxed.org
Thu May 26 15:40:43 CEST 2022
On Thu, May 26, 2022 at 03:33:44PM +0200, Daniel Gröber wrote:
> Changes in v3:
> - Squash with ecmp weigth patch
> - Add babel_route_is_selected() as replacement for e->selected
> I'm not totally sure the lazy approach is safe yet. We might need
> additional bookeeping to reset r->active_nexthop on route
> retraction/flush instead.
Forgot to mention:
- Refactor route reload and use babel_announce_rte directly instead of
via babel_select_route.
> +static void
> +babel_reconfigure_routes(struct babel_proto *p, struct fib *rtable)
> +{
> + struct fib_iterator fit;
> + FIB_ITERATE_INIT(&fit, rtable);
> + FIB_ITERATE_START(rtable, &fit, struct babel_entry, e)
> + babel_announce_rte(p, e);
> + FIB_ITERATE_END;
> +}
> +
> static int
> babel_reconfigure(struct proto *P, struct proto_config *CF)
> {
> @@ -2460,6 +2523,10 @@ babel_reconfigure(struct proto *P, struct proto_config *CF)
> p->p.cf = CF;
> babel_reconfigure_ifaces(p, new);
>
> + /* Update all routes to refresh ecmp settings. */
> + babel_reconfigure_routes(p, &p->ip6_rtable);
> + babel_reconfigure_routes(p, &p->ip4_rtable);
> +
> babel_trigger_update(p);
> babel_kick_timer(p);
--Daniel
More information about the Bird-users
mailing list