summaryrefslogtreecommitdiffstats
path: root/sharpd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-02-08 16:19:34 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-02-09 02:38:14 +0100
commit42567e0011491fe799eef6d236ecf1937c59c18f (patch)
tree58a439cbecc28a92e5537ac109a9ef7fe231e557 /sharpd
parentlib, sharpd, zebra: Add new enum for lsp type and pass it through. (diff)
downloadfrr-42567e0011491fe799eef6d236ecf1937c59c18f.tar.xz
frr-42567e0011491fe799eef6d236ecf1937c59c18f.zip
bgpd, lib, sharpd, zebra: Use MPLS_LABEL_NONE
Modify mpls.h to rename MPLS_LABEL_ILLEGAL to be MPLS_LABEL_NONE. Fix all pre-existing code that used MPLS_LABEL_ILLEGAL. Modify the zapi vrf label message to use MPLS_LABEL_NONE as the signal to remove label associated with a vrf. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'sharpd')
-rw-r--r--sharpd/sharp_vty.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sharpd/sharp_vty.c b/sharpd/sharp_vty.c
index 786191e6a..4f7d61b22 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;
}