From: Mark Stapp Date: Thu, 19 Jul 2018 18:55:02 +0000 (-0400) Subject: zebra: ensure redist of system routes X-Git-Tag: frr-7.1-dev~233^2~13 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=5af4b34689ab774dc9c51eab717b57a036b2daca;p=matthieu%2Ffrr.git zebra: ensure redist of system routes We need a bit of special handling for system routes, which need to be offered for redistribution even though they won't be passing through the dplane system. Signed-off-by: Mark Stapp --- diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 496e0f10b7..87bf081a5d 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -1841,14 +1841,23 @@ static void rib_process(struct route_node *rn) /* Update SELECTED entry */ if (old_selected != new_selected || selected_changed) { - if (new_selected) - SET_FLAG(new_selected->flags, ZEBRA_FLAG_SELECTED); - if (new_selected && new_selected != new_fib) { nexthop_active_update(rn, new_selected, 1); UNSET_FLAG(new_selected->status, ROUTE_ENTRY_CHANGED); } + if (new_selected) { + SET_FLAG(new_selected->flags, ZEBRA_FLAG_SELECTED); + + /* Special case: new route is system route, so + * dataplane update will not be done - ensure we + * redistribute the route. + */ + if (RIB_SYSTEM_ROUTE(new_selected)) + redistribute_update(p, src_p, new_selected, + old_selected); + } + if (old_selected) { if (!new_selected) redistribute_delete(p, src_p, old_selected);