summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJorge Boncompte <jbonor@gmail.com>2017-07-27 12:34:10 +0200
committerJorge Boncompte <jbonor@gmail.com>2017-08-04 10:19:36 +0200
commit8628fc612b25e6b92e69c0cd198f8696f6888632 (patch)
treee03d313121255650d7df2521d61a0375215a0140
parent3ce588804a2003e62352069af9a4667d1c899a2e (diff)
zebra: cleanup, use RIB_SYSTEM_ROUTE() define where appropiate
Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
-rw-r--r--zebra/zebra_rib.c7
1 files changed, 3 insertions, 4 deletions
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);