]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: cleanup, use RIB_SYSTEM_ROUTE() define where appropiate
authorJorge Boncompte <jbonor@gmail.com>
Thu, 27 Jul 2017 10:34:10 +0000 (12:34 +0200)
committerJorge Boncompte <jbonor@gmail.com>
Fri, 4 Aug 2017 08:19:36 +0000 (10:19 +0200)
Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
zebra/zebra_rib.c

index 8dca4f9f83da17c157ddf4d3be3488f07cd51703..e61c2e7b0e8c3cf8910a8e369f78548d9a111ef0 100644 (file)
@@ -2239,13 +2239,12 @@ int rib_add_multipath(afi_t afi, safi_t safi, struct prefix *p,
                        continue;
 
                if (same->type == re->type && same->instance == re->instance
-                   && same->table == re->table
-                   && !RIB_SYSTEM_ROUTE(same))
+                   && same->table == re->table && !RIB_SYSTEM_ROUTE(same))
                        break;
        }
 
        /* If this route is kernel route, set FIB flag to the route. */
-       if (re->type == ZEBRA_ROUTE_KERNEL || re->type == ZEBRA_ROUTE_CONNECT)
+       if (RIB_SYSTEM_ROUTE(re))
                for (nexthop = re->nexthop; nexthop; nexthop = nexthop->next)
                        SET_FLAG(nexthop->flags, NEXTHOP_FLAG_FIB);
 
@@ -2517,7 +2516,7 @@ int rib_add(afi_t afi, safi_t safi, vrf_id_t vrf_id, int type, u_short instance,
                route_entry_nexthop_ifindex_add(re, ifindex);
 
        /* If this route is kernel route, set FIB flag to the route. */
-       if (type == ZEBRA_ROUTE_KERNEL || type == ZEBRA_ROUTE_CONNECT)
+       if (RIB_SYSTEM_ROUTE(re))
                for (nexthop = re->nexthop; nexthop; nexthop = nexthop->next)
                        SET_FLAG(nexthop->flags, NEXTHOP_FLAG_FIB);