]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: ensure redist of system routes
authorMark Stapp <mjs@voltanet.io>
Thu, 19 Jul 2018 18:55:02 +0000 (14:55 -0400)
committerMark Stapp <mjs@voltanet.io>
Thu, 25 Oct 2018 12:34:30 +0000 (08:34 -0400)
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>
zebra/zebra_rib.c

index 496e0f10b76cc287e019ae24fa9513f6e7806bea..87bf081a5dd28930cc236ddde99d5cf1d1571b73 100644 (file)
@@ -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);