summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/rfapi/bgp_rfapi_cfg.c4
-rw-r--r--lib/mpls.h2
-rw-r--r--lib/zclient.h2
-rw-r--r--sharpd/sharp_vty.c8
-rw-r--r--zebra/zserv.c4
5 files changed, 11 insertions, 9 deletions
diff --git a/bgpd/rfapi/bgp_rfapi_cfg.c b/bgpd/rfapi/bgp_rfapi_cfg.c
index e3cb739464..949e04ab0d 100644
--- a/bgpd/rfapi/bgp_rfapi_cfg.c
+++ b/bgpd/rfapi/bgp_rfapi_cfg.c
@@ -554,7 +554,7 @@ rfapi_group_new(struct bgp *bgp, rfapi_group_cfg_type_t type, const char *name)
/* add to tail of list */
listnode_add(bgp->rfapi_cfg->nve_groups_sequential, rfg);
}
- rfg->label = MPLS_LABEL_ILLEGAL;
+ rfg->label = MPLS_LABEL_NONE;
QOBJ_REG(rfg, rfapi_nve_group_cfg);
return rfg;
@@ -3063,7 +3063,7 @@ DEFUN (vnc_vrf_policy_no_label,
vnc_redistribute_prechange(bgp);
}
- rfg->label = MPLS_LABEL_ILLEGAL;
+ rfg->label = MPLS_LABEL_NONE;
if (bgp->rfapi_cfg->rfg_redist == rfg) {
vnc_redistribute_postchange(bgp);
diff --git a/lib/mpls.h b/lib/mpls.h
index b55d4875ae..1a1819c2c0 100644
--- a/lib/mpls.h
+++ b/lib/mpls.h
@@ -38,7 +38,7 @@
#define MPLS_LABEL_OAM_ALERT 14 /* [RFC3429] */
#define MPLS_LABEL_EXTENSION 15 /* [RFC7274] */
#define MPLS_LABEL_MAX 1048575
-#define MPLS_LABEL_ILLEGAL 0xFFFFFFFF /* for internal use only */
+#define MPLS_LABEL_NONE 0xFFFFFFFF /* for internal use only */
/* Minimum and maximum label values */
#define MPLS_LABEL_RESERVED_MIN 0
diff --git a/lib/zclient.h b/lib/zclient.h
index ff65838b53..344b45fb54 100644
--- a/lib/zclient.h
+++ b/lib/zclient.h
@@ -387,7 +387,7 @@ extern void redist_del_instance(struct redist_proto *, u_short);
* Send to zebra that the specified vrf is using label to resolve
* itself for L3VPN's. Repeated calls of this function with
* different labels will cause an effective update of the
- * label for lookup. If you pass in MPLS_LABEL_IPV4_EXPLICIT_NULL
+ * label for lookup. If you pass in MPLS_LABEL_NONE
* we will cause a delete action and remove this label pop
* operation.
*/
diff --git a/sharpd/sharp_vty.c b/sharpd/sharp_vty.c
index 786191e6a1..4f7d61b22f 100644
--- a/sharpd/sharp_vty.c
+++ b/sharpd/sharp_vty.c
@@ -79,13 +79,12 @@ DEFPY (install_routes,
return CMD_SUCCESS;
}
-DEFPY(vrf_label,
- vrf_label_cmd,
+DEFPY(vrf_label, vrf_label_cmd,
"sharp label vrf NAME$name label (0-100000)$label",
"Sharp Routing Protocol\n"
"Give a vrf a label\n"
VRF_CMD_HELP_STR
- "The label to use\n"
+ "The label to use, 0 specifies remove the label installed from previous\n"
"Specified range to use\n")
{
struct vrf *vrf;
@@ -100,6 +99,9 @@ DEFPY(vrf_label,
return CMD_WARNING_CONFIG_FAILED;
}
+ if (label == 0)
+ label = MPLS_LABEL_NONE;
+
vrf_label_add(vrf->vrf_id, label);
return CMD_SUCCESS;
}
diff --git a/zebra/zserv.c b/zebra/zserv.c
index 3d8be27f3b..704b861960 100644
--- a/zebra/zserv.c
+++ b/zebra/zserv.c
@@ -2518,11 +2518,11 @@ static void zread_vrf_label(struct zserv *client,
def_zvrf = zebra_vrf_lookup_by_id(VRF_DEFAULT);
- if (zvrf->label != MPLS_LABEL_IPV4_EXPLICIT_NULL)
+ if (zvrf->label != MPLS_LABEL_NONE)
mpls_lsp_uninstall(def_zvrf, ltype, zvrf->label,
NEXTHOP_TYPE_IFINDEX, NULL, ifp->ifindex);
- if (nlabel != MPLS_LABEL_IPV4_EXPLICIT_NULL)
+ if (nlabel != MPLS_LABEL_NONE)
mpls_lsp_install(def_zvrf, ltype, nlabel, MPLS_LABEL_IMPLICIT_NULL,
NEXTHOP_TYPE_IFINDEX, NULL, ifp->ifindex);