diff options
Diffstat (limited to 'zebra/zebra_mpls_openbsd.c')
| -rw-r--r-- | zebra/zebra_mpls_openbsd.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/zebra/zebra_mpls_openbsd.c b/zebra/zebra_mpls_openbsd.c index 5e18414985..b767929dc0 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; @@ -274,8 +276,7 @@ static int kernel_lsp_cmd(struct zebra_dplane_ctx *ctx) && CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_FIB)))) { if (nhlfe->nexthop->nh_label->num_labels > 1) { flog_warn(EC_ZEBRA_MAX_LABELS_PUSH, - "%s: can't push %u labels at once " - "(maximum is 1)", + "%s: can't push %u labels at once (maximum is 1)", __func__, nhlfe->nexthop->nh_label->num_labels); continue; |
