diff options
| author | Mark Stapp <mjs@voltanet.io> | 2018-07-19 14:55:02 -0400 |
|---|---|---|
| committer | Mark Stapp <mjs@voltanet.io> | 2018-10-25 08:34:30 -0400 |
| commit | 5af4b34689ab774dc9c51eab717b57a036b2daca (patch) | |
| tree | 266fbed26e8a554d7987e7712aa33f48356ec378 /zebra/zebra_rib.c | |
| parent | 5709131cec0a3ebd9739b287b8cd2bb5c421357f (diff) | |
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 <mjs@voltanet.io>
Diffstat (limited to 'zebra/zebra_rib.c')
| -rw-r--r-- | zebra/zebra_rib.c | 15 |
1 files changed, 12 insertions, 3 deletions
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); |
