diff options
author | Christian Franke <chris@opensourcerouting.org> | 2013-07-05 15:35:38 +0000 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2013-09-19 18:04:40 +0200 |
commit | 48a53dc71cb422e619859b79d5069e02fcd867d0 (patch) | |
tree | ff5e8148efb422e0dd074657951f5dd5a1c0150b | |
parent | fa713d9ee5ed30dedd0a290be9aaff780a2896be (diff) |
zebra: handle blackholes encountered in recursive resolution
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
-rw-r--r-- | zebra/zebra_rib.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index e39976ee..301e0cc1 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -472,6 +472,12 @@ nexthop_active_ipv4 (struct rib *rib, struct nexthop *nexthop, int set, } else { + /* If the longest prefix match for the nexthop yields + * a blackhole, mark it as inactive. */ + if (CHECK_FLAG (match->flags, ZEBRA_FLAG_BLACKHOLE) + || CHECK_FLAG (match->flags, ZEBRA_FLAG_REJECT)) + return 0; + if (match->type == ZEBRA_ROUTE_CONNECT) { /* Directly point connected route. */ @@ -587,6 +593,12 @@ nexthop_active_ipv6 (struct rib *rib, struct nexthop *nexthop, int set, } else { + /* If the longest prefix match for the nexthop yields + * a blackhole, mark it as inactive. */ + if (CHECK_FLAG (match->flags, ZEBRA_FLAG_BLACKHOLE) + || CHECK_FLAG (match->flags, ZEBRA_FLAG_REJECT)) + return 0; + if (match->type == ZEBRA_ROUTE_CONNECT) { /* Directly point connected route. */ |