summaryrefslogtreecommitdiff
path: root/zebra/zebra_mpls.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-01-31 18:24:06 -0500
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-02-08 20:31:37 -0500
commit70e98a7fe7296a1279c6b7142e57221f71ff3121 (patch)
tree77325f78eefb0c95c96d18f8f09fee296d55db35 /zebra/zebra_mpls.c
parentb9abd9adac023bdb4927e6f9d095a3234240643a (diff)
*: Make code use a consisten definition of labels
Turns out we had 3 different ways to define labels all of them overlapping with the same meanings. Consolidate to 1. This one choosen is consistent naming wise with what the *bsd and linux kernels use. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_mpls.c')
-rw-r--r--zebra/zebra_mpls.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c
index adc893302c..3ceebf417e 100644
--- a/zebra/zebra_mpls.c
+++ b/zebra/zebra_mpls.c
@@ -411,12 +411,13 @@ static int fec_change_update_lsp(struct zebra_vrf *zvrf, zebra_fec_t *fec,
afi_t afi;
/* Uninstall label forwarding entry, if previously installed. */
- if (old_label != MPLS_INVALID_LABEL && old_label != MPLS_IMP_NULL_LABEL)
+ if (old_label != MPLS_INVALID_LABEL &&
+ old_label != MPLS_LABEL_IMPLICIT_NULL)
lsp_uninstall(zvrf, old_label);
/* Install label forwarding entry corr. to new label, if needed. */
if (fec->label == MPLS_INVALID_LABEL
- || fec->label == MPLS_IMP_NULL_LABEL)
+ || fec->label == MPLS_LABEL_IMPLICIT_NULL)
return 0;
afi = family2afi(PREFIX_FAMILY(&fec->rn->p));
@@ -1821,7 +1822,7 @@ int zebra_mpls_lsp_install(struct zebra_vrf *zvrf, struct route_node *rn,
/* We cannot install a label forwarding entry if local label is the
* implicit-null label.
*/
- if (fec->label == MPLS_IMP_NULL_LABEL)
+ if (fec->label == MPLS_LABEL_IMPLICIT_NULL)
return 0;
if (lsp_install(zvrf, fec->label, rn, re))
@@ -2565,8 +2566,8 @@ int zebra_mpls_lsp_label_consistent(struct zebra_vrf *zvrf,
int cur_op, new_op;
cur_op = (slsp->snhlfe_list->out_label
- == MPLS_IMP_NULL_LABEL);
- new_op = (out_label == MPLS_IMP_NULL_LABEL);
+ == MPLS_LABEL_IMPLICIT_NULL);
+ new_op = (out_label == MPLS_LABEL_IMPLICIT_NULL);
if (cur_op != new_op)
return 0;
}
@@ -2850,11 +2851,11 @@ int zebra_mpls_write_lsp_config(struct vty *vty, struct zebra_vrf *zvrf)
snhlfe2str(snhlfe, buf, sizeof(buf));
switch (snhlfe->out_label) {
- case MPLS_V4_EXP_NULL_LABEL:
- case MPLS_V6_EXP_NULL_LABEL:
+ case MPLS_LABEL_IPV4_EXPLICIT_NULL:
+ case MPLS_LABEL_IPV6_EXPLICIT_NULL:
strlcpy(lstr, "explicit-null", sizeof(lstr));
break;
- case MPLS_IMP_NULL_LABEL:
+ case MPLS_LABEL_IMPLICIT_NULL:
strlcpy(lstr, "implicit-null", sizeof(lstr));
break;
default: