summaryrefslogtreecommitdiffstats
path: root/ldpd/lde.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-02-01 00:24:06 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-02-09 02:31:37 +0100
commit70e98a7fe7296a1279c6b7142e57221f71ff3121 (patch)
tree77325f78eefb0c95c96d18f8f09fee296d55db35 /ldpd/lde.c
parentzebra: Cleanup mpls handling to allow a NEXTHOP_TYPE_IFINDEX (diff)
downloadfrr-70e98a7fe7296a1279c6b7142e57221f71ff3121.tar.xz
frr-70e98a7fe7296a1279c6b7142e57221f71ff3121.zip
*: 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 'ldpd/lde.c')
-rw-r--r--ldpd/lde.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/ldpd/lde.c b/ldpd/lde.c
index 63e1e3994..a70b97d06 100644
--- a/ldpd/lde.c
+++ b/ldpd/lde.c
@@ -702,20 +702,20 @@ lde_update_label(struct fec_node *fn)
switch (fn->fec.type) {
case FEC_TYPE_IPV4:
if (!(ldeconf->ipv4.flags & F_LDPD_AF_EXPNULL))
- return (MPLS_LABEL_IMPLNULL);
+ return (MPLS_LABEL_IMPLICIT_NULL);
if (lde_acl_check(ldeconf->ipv4.acl_label_expnull_for,
AF_INET, (union ldpd_addr *)&fn->fec.u.ipv4.prefix,
fn->fec.u.ipv4.prefixlen) != FILTER_PERMIT)
- return (MPLS_LABEL_IMPLNULL);
- return (MPLS_LABEL_IPV4NULL);
+ return (MPLS_LABEL_IMPLICIT_NULL);
+ return MPLS_LABEL_IPV4_EXPLICIT_NULL;
case FEC_TYPE_IPV6:
if (!(ldeconf->ipv6.flags & F_LDPD_AF_EXPNULL))
- return (MPLS_LABEL_IMPLNULL);
+ return (MPLS_LABEL_IMPLICIT_NULL);
if (lde_acl_check(ldeconf->ipv6.acl_label_expnull_for,
AF_INET6, (union ldpd_addr *)&fn->fec.u.ipv6.prefix,
fn->fec.u.ipv6.prefixlen) != FILTER_PERMIT)
- return (MPLS_LABEL_IMPLNULL);
- return (MPLS_LABEL_IPV6NULL);
+ return (MPLS_LABEL_IMPLICIT_NULL);
+ return MPLS_LABEL_IPV6_EXPLICIT_NULL;
default:
fatalx("lde_update_label: unexpected fec type");
break;
@@ -1522,11 +1522,15 @@ lde_change_egress_label(int af)
/* explicitly withdraw all null labels */
RB_FOREACH(ln, nbr_tree, &lde_nbrs) {
- lde_send_labelwithdraw_wcard(ln, MPLS_LABEL_IMPLNULL);
+ lde_send_labelwithdraw_wcard(ln, MPLS_LABEL_IMPLICIT_NULL);
if (ln->v4_enabled)
- lde_send_labelwithdraw_wcard(ln, MPLS_LABEL_IPV4NULL);
+ lde_send_labelwithdraw_wcard(
+ ln,
+ MPLS_LABEL_IPV4_EXPLICIT_NULL);
if (ln->v6_enabled)
- lde_send_labelwithdraw_wcard(ln, MPLS_LABEL_IPV6NULL);
+ lde_send_labelwithdraw_wcard(
+ ln,
+ MPLS_LABEL_IPV6_EXPLICIT_NULL);
}
/* update label of connected routes */