summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--zebra/zebra_rib.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index ade13578..5615f73e 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -367,6 +367,12 @@ nexthop_isactive(const struct nexthop *nexthop)
}
}
+static int rib_is_ebgp(const struct rib *rib)
+{
+ return rib->type == ZEBRA_ROUTE_BGP
+ && !CHECK_FLAG (rib->flags, ZEBRA_FLAG_IBGP);
+}
+
/* If force flag is not set, do not modify falgs at all for uninstall
the route from FIB. */
static int
@@ -417,8 +423,7 @@ nexthop_active_ipv4 (struct rib *rib, struct nexthop *nexthop, int set,
/* If there is no selected route or matched route is EGP, go up
tree. */
- if (! match
- || match->type == ZEBRA_ROUTE_BGP)
+ if (! match || rib_is_ebgp(match))
{
do {
rn = rn->parent;
@@ -550,8 +555,7 @@ nexthop_active_ipv6 (struct rib *rib, struct nexthop *nexthop, int set,
/* If there is no selected route or matched route is EGP, go up
tree. */
- if (! match
- || match->type == ZEBRA_ROUTE_BGP)
+ if (! match || rib_is_ebgp(match))
{
do {
rn = rn->parent;