summaryrefslogtreecommitdiff
path: root/zebra/zebra_mpls.c
diff options
context:
space:
mode:
authorDmytro Shytyi <dmytro.shytyi@6wind.com>2022-12-05 16:44:01 +0100
committerDmytro Shytyi <dmytro.shytyi@6wind.com>2024-06-07 12:33:47 +0200
commit110cb369a32d4d14a86dd173817691e4dd124c19 (patch)
tree22f9f404833e33ece2cb43e286b170af8724c369 /zebra/zebra_mpls.c
parentcc25d7bd92bdf80cf149b45158fb14d3b57aea28 (diff)
zebra: when adding an LSP, update the log message with multiple label
When an LSP entry is created from a FEC entry, multiple labels may now be appended to the LSP entry, instead of one single. Upon lsp creation, the LSP trace will display all the labels appended. Signed-off-by: Dmytro Shytyi <dmytro.shytyi@6wind.com>
Diffstat (limited to 'zebra/zebra_mpls.c')
-rw-r--r--zebra/zebra_mpls.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c
index 17fe455741..e682949192 100644
--- a/zebra/zebra_mpls.c
+++ b/zebra/zebra_mpls.c
@@ -234,11 +234,18 @@ static int lsp_install(struct zebra_vrf *zvrf, mpls_label_t label,
return -1;
if (IS_ZEBRA_DEBUG_MPLS) {
+ char label_str[MPLS_LABEL_STRLEN];
+
nhlfe2str(nhlfe, buf, BUFSIZ);
- zlog_debug(
- "Add LSP in-label %u type %d nexthop %s out-label %u",
- lsp->ile.in_label, lsp_type, buf,
- nexthop->nh_label->label[0]);
+ zlog_debug("Add LSP in-label %u type %d nexthop %s out-label %s",
+ lsp->ile.in_label, lsp_type, buf,
+ mpls_label2str(nexthop->nh_label
+ ->num_labels,
+ nexthop->nh_label->label,
+ label_str,
+ sizeof(label_str),
+ nexthop->nh_label_type,
+ 0));
}
lsp->addr_family = NHLFE_FAMILY(nhlfe);