From d5fbebd8a1bee16213c74cd01600b8d26cf37a2b Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 8 Jul 2009 13:22:31 -0700 Subject: Allow iBGP to be used for recusive routes Bug 4228 This inclues iBGP routes in the active route calculation. --- zebra/zebra_rib.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'zebra/zebra_rib.c') 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; -- cgit v1.2.3