summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_mpls.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:55:47 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:55:47 +0000
commit514c1c8597cf7f24871e15a6eaeaedd2b5aedf4d (patch)
treebc56d8649885e6012dc37130c9f5b2a7129ed79f /zebra/zebra_mpls.c
parentReleasing progress-linux version 10.0-2~progress7.99u1. (diff)
downloadfrr-514c1c8597cf7f24871e15a6eaeaedd2b5aedf4d.tar.xz
frr-514c1c8597cf7f24871e15a6eaeaedd2b5aedf4d.zip
Merging upstream version 10.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'zebra/zebra_mpls.c')
-rw-r--r--zebra/zebra_mpls.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c
index 15e36ac..39fc678 100644
--- a/zebra/zebra_mpls.c
+++ b/zebra/zebra_mpls.c
@@ -2634,8 +2634,16 @@ int zebra_mpls_write_fec_config(struct vty *vty, struct zebra_vrf *zvrf)
continue;
write = 1;
- vty_out(vty, "mpls label bind %pFX %s\n", &rn->p,
- label2str(fec->label, 0, lstr, BUFSIZ));
+
+ if (fec->label == MPLS_LABEL_IPV4_EXPLICIT_NULL ||
+ fec->label == MPLS_LABEL_IPV6_EXPLICIT_NULL)
+ strlcpy(lstr, "explicit-null", sizeof(lstr));
+ else if (fec->label == MPLS_LABEL_IMPLICIT_NULL)
+ strlcpy(lstr, "implicit-null", sizeof(lstr));
+ else
+ snprintf(lstr, sizeof(lstr), "%d", fec->label);
+
+ vty_out(vty, "mpls label bind %pFX %s\n", &rn->p, lstr);
}
}