summaryrefslogtreecommitdiff
path: root/lib/nexthop.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/nexthop.c')
-rw-r--r--lib/nexthop.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/nexthop.c b/lib/nexthop.c
index 26c338256f..d6c654a692 100644
--- a/lib/nexthop.c
+++ b/lib/nexthop.c
@@ -699,6 +699,15 @@ struct nexthop *nexthop_next(const struct nexthop *nexthop)
return NULL;
}
+struct nexthop *nexthop_next_resolution(const struct nexthop *nexthop,
+ bool nexthop_resolution)
+{
+ if (nexthop_resolution)
+ return nexthop_next(nexthop);
+ /* no resolution attempt */
+ return nexthop->next;
+}
+
/* Return the next nexthop in the tree that is resolved and active */
struct nexthop *nexthop_next_active_resolved(const struct nexthop *nexthop)
{