summaryrefslogtreecommitdiff
path: root/lib/nexthop.h
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2022-12-28 15:49:53 +0100
committerDmytro Shytyi <dmytro.shytyi@6wind.com>2024-06-07 12:33:47 +0200
commitcc25d7bd92bdf80cf149b45158fb14d3b57aea28 (patch)
tree9ee629c990eb8e82e5dd40d5b48687d69a1cc72b /lib/nexthop.h
parent449e80ab743fa51ee60f8f7c535fa952f965fc5b (diff)
zebra, lib: upon lsp install, iterate nexthop accordingly
There are two ways of iterating over nexthops of a given route entry. - Either only the main nexthop are taken into account (which is the case today when attempting to install an LSP entry on a BGP connected labeled route. - Or by taking into account nexthops that are resolved and linked in nexthop->resolved of the previous nexthop which has RECURSIVE flag set. This second case has to be taken into account in the case where recursive routes may be used to install an LSP entry. Introduce a new API in nexthop that will parse over the appropriate nexthop, if the nexthop-resolution flag is turned on or not on the given VRF. Use that API in the lsp_install() function so as to walk over the appropriate nexthops. Co-developed-by: Dmytro Shytyi <dmytro.shytyi@6wind.com> Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com> Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
Diffstat (limited to 'lib/nexthop.h')
-rw-r--r--lib/nexthop.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/nexthop.h b/lib/nexthop.h
index 27073b948d..457c81972e 100644
--- a/lib/nexthop.h
+++ b/lib/nexthop.h
@@ -223,6 +223,8 @@ extern bool nexthop_labels_match(const struct nexthop *nh1,
extern const char *nexthop2str(const struct nexthop *nexthop,
char *str, int size);
extern struct nexthop *nexthop_next(const struct nexthop *nexthop);
+extern struct nexthop *nexthop_next_resolution(const struct nexthop *nexthop,
+ bool nexthop_resolution);
extern struct nexthop *
nexthop_next_active_resolved(const struct nexthop *nexthop);
extern unsigned int nexthop_level(const struct nexthop *nexthop);