summaryrefslogtreecommitdiff
path: root/zebra/zebra_mpls_openbsd.c
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2020-05-19 14:11:32 -0400
committerMark Stapp <mjs@voltanet.io>2020-06-01 14:46:12 -0400
commitee70f629792b90f92ea7e6becec2450f37bc191b (patch)
treedbefb1900f700707108433bef2158fc8d868e971 /zebra/zebra_mpls_openbsd.c
parent55add95cd7353adec9b46e61b93172d2030a6faa (diff)
zebra: convert LSP nhlfe lists to use typesafe lists
Convert the embedded lists of nhlfes and snhlfes in zebra LSPs and SLSPs to use typesafe dlists. Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'zebra/zebra_mpls_openbsd.c')
-rw-r--r--zebra/zebra_mpls_openbsd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/zebra/zebra_mpls_openbsd.c b/zebra/zebra_mpls_openbsd.c
index 5e18414985..c8a3cbbbce 100644
--- a/zebra/zebra_mpls_openbsd.c
+++ b/zebra/zebra_mpls_openbsd.c
@@ -239,8 +239,9 @@ static int kernel_send_rtmsg_v6(int action, mpls_label_t in_label,
static int kernel_lsp_cmd(struct zebra_dplane_ctx *ctx)
{
+ const struct nhlfe_list_head *head;
const zebra_nhlfe_t *nhlfe;
- struct nexthop *nexthop = NULL;
+ const struct nexthop *nexthop = NULL;
unsigned int nexthop_num = 0;
int action;
@@ -258,7 +259,8 @@ static int kernel_lsp_cmd(struct zebra_dplane_ctx *ctx)
return -1;
}
- for (nhlfe = dplane_ctx_get_nhlfe(ctx); nhlfe; nhlfe = nhlfe->next) {
+ head = dplane_ctx_get_nhlfe_list(ctx);
+ frr_each(nhlfe_list_const, head, nhlfe) {
nexthop = nhlfe->nexthop;
if (!nexthop)
continue;