From: Jorge Boncompte Date: Thu, 27 Jul 2017 10:34:10 +0000 (+0200) Subject: zebra: cleanup, use RIB_SYSTEM_ROUTE() define where appropiate X-Git-Tag: frr-4.0-dev~455^2~3 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=8628fc612b25e6b92e69c0cd198f8696f6888632;p=mirror%2Ffrr.git zebra: cleanup, use RIB_SYSTEM_ROUTE() define where appropiate Signed-off-by: Jorge Boncompte --- diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 8dca4f9f83..e61c2e7b0e 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -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);