summaryrefslogtreecommitdiff
path: root/lib/nexthop.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2024-04-19 12:13:32 -0400
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-04-23 12:10:36 +0000
commitab1c9a314ec52444990f6fca92092a62089f638a (patch)
tree421b04473b9fbd47e429d4f16391400c3c120369 /lib/nexthop.h
parent81f999f6d4a9e42921349fb902d20238ab401da7 (diff)
lib, zebra: Check for not being a blackhole route
In zebra_interface_nhg_reinstall zebra is checking that the nhg is a singleton and not a blackhole nhg. This was originally done with checking that the nexthop is a NEXTHOP_TYPE_IFINDEX, NEXTHOP_TYPE_IPV4_IFINDEX and NEXTHOP_TYPE_IPV6_IFINDEX. This was excluding NEXTHOP_TYPE_IPV4 and NEXTHOP_TYPE_IPV6. These were both possible to be received and maintained from the upper level protocol for when a route is being recursively resolved. If we have gotten to this point in zebra_interface_nhg_reinstall the nexthop group has already been installed at least once and we *know* that it is actually a valid nexthop. What the test is really trying to do is ensure that we are not reinstalling a blackhole nexthop group( Which is not possible to even be here by the way, but safety first! ). So let's change to test for that instead. Signed-off-by: Donald Sharp <sharpd@nvidia.com> (cherry picked from commit 29c1ff446e581fc403d155fd1d00b7c944cba56a)
Diffstat (limited to 'lib/nexthop.h')
-rw-r--r--lib/nexthop.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/nexthop.h b/lib/nexthop.h
index bed6447d49..958d06aa51 100644
--- a/lib/nexthop.h
+++ b/lib/nexthop.h
@@ -240,8 +240,8 @@ extern struct nexthop *nexthop_dup(const struct nexthop *nexthop,
extern struct nexthop *nexthop_dup_no_recurse(const struct nexthop *nexthop,
struct nexthop *rparent);
-/* Check nexthop of IFINDEX type */
-extern bool nexthop_is_ifindex_type(const struct nexthop *nh);
+/* Is this nexthop a blackhole? */
+extern bool nexthop_is_blackhole(const struct nexthop *nh);
/*
* Parse one or more backup index values, as comma-separated numbers,