summaryrefslogtreecommitdiff
path: root/zebra/zebra_rib.c
diff options
context:
space:
mode:
authorJafar Al-Gharaibeh <Jafaral@users.noreply.github.com>2017-09-21 11:16:35 -0500
committerGitHub <noreply@github.com>2017-09-21 11:16:35 -0500
commitb1cebe20cd1b5663cc2a47a99ac94dac046b8610 (patch)
tree4f58a33be7bc8dd62762b6e1e5a7bede8966e4d8 /zebra/zebra_rib.c
parent972019ae02b5fc6daa3a04790c4687a7399f367c (diff)
parente22ac3eec4f1b2072d169fcc84a16e040e376f74 (diff)
Merge pull request #1157 from donaldsharp/recursive_blackhole
Recursive blackhole resolution
Diffstat (limited to 'zebra/zebra_rib.c')
-rw-r--r--zebra/zebra_rib.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index 4c63d1d8bf..bb49663319 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -370,6 +370,10 @@ static void nexthop_set_resolved(afi_t afi, struct nexthop *newhop,
resolved_hop->ifindex = newhop->ifindex;
}
+ if (newhop->type == NEXTHOP_TYPE_BLACKHOLE) {
+ resolved_hop->type = NEXTHOP_TYPE_BLACKHOLE;
+ resolved_hop->bh_type = nexthop->bh_type;
+ }
resolved_hop->rparent = nexthop;
nexthop_add(&nexthop->resolved, resolved_hop);
}
@@ -496,8 +500,6 @@ static int nexthop_active(afi_t afi, struct route_entry *re,
} else if (CHECK_FLAG(re->flags, ZEBRA_FLAG_INTERNAL)) {
resolved = 0;
for (ALL_NEXTHOPS(match->nexthop, newhop)) {
- if (newhop->type == NEXTHOP_TYPE_BLACKHOLE)
- continue;
if (!CHECK_FLAG(newhop->flags,
NEXTHOP_FLAG_FIB))
continue;
@@ -521,8 +523,6 @@ static int nexthop_active(afi_t afi, struct route_entry *re,
} else if (re->type == ZEBRA_ROUTE_STATIC) {
resolved = 0;
for (ALL_NEXTHOPS(match->nexthop, newhop)) {
- if (newhop->type == NEXTHOP_TYPE_BLACKHOLE)
- continue;
if (!CHECK_FLAG(newhop->flags,
NEXTHOP_FLAG_FIB))
continue;