From 95a70b43158b464ed40ccafd2ef1edd97b7f2e31 Mon Sep 17 00:00:00 2001 From: Mark Stapp Date: Mon, 2 Mar 2020 15:51:22 -0500 Subject: [PATCH] zebra: allow multiple labels in LSP zapi message The handlers for a couple of the main LSP-oriented zapi messages explicitly limited themselves to a single out-label. Allow multiple labels if the sender ... sends them. Signed-off-by: Mark Stapp --- zebra/zapi_msg.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c index 43bad5522c..a47759f40f 100644 --- a/zebra/zapi_msg.c +++ b/zebra/zapi_msg.c @@ -1826,7 +1826,9 @@ static void zread_mpls_labels_add(ZAPI_HANDLER_ARGS) struct zapi_nexthop *znh; znh = &zl.nexthops[i]; - mpls_lsp_install(zvrf, zl.type, zl.local_label, 1, znh->labels, + + mpls_lsp_install(zvrf, zl.type, zl.local_label, + znh->label_num, znh->labels, znh->type, &znh->gate, znh->ifindex); if (CHECK_FLAG(zl.message, ZAPI_LABELS_FTN)) @@ -1929,7 +1931,7 @@ static void zread_mpls_labels_replace(ZAPI_HANDLER_ARGS) znh = &zl.nexthops[i]; mpls_lsp_install(zvrf, zl.type, zl.local_label, - 1, znh->labels, znh->type, + znh->label_num, znh->labels, znh->type, &znh->gate, znh->ifindex); if (CHECK_FLAG(zl.message, ZAPI_LABELS_FTN)) {