summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-07-08 13:22:31 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-07-08 13:44:15 -0700
commitd5fbebd8a1bee16213c74cd01600b8d26cf37a2b (patch)
tree5676ed9b30cb9369256fb1387d307ae9d47dd9e6
parent36badf46433466d9ddfa8cf6bd652d5f9959b5dd (diff)
downloadquagga-d5fbebd8a1bee16213c74cd01600b8d26cf37a2b.tar.bz2
quagga-d5fbebd8a1bee16213c74cd01600b8d26cf37a2b.tar.xz
Allow iBGP to be used for recusive routes
Bug 4228 This inclues iBGP routes in the active route calculation.
-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;