summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_mpls_vty.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2016-10-25 22:29:52 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2016-10-25 22:29:52 +0200
commitd64ff607e8a5b84cb3226bd38a5af09668a05fd3 (patch)
tree5986c22d3fb8aaf17d64226a7cdd4fcd913fef2f /zebra/zebra_mpls_vty.c
parentMerge branch 'cmaster-next' into vtysh-grammar (diff)
parentospfd: Only allow ospf RI commands if RI is turned on (diff)
downloadfrr-d64ff607e8a5b84cb3226bd38a5af09668a05fd3.tar.xz
frr-d64ff607e8a5b84cb3226bd38a5af09668a05fd3.zip
Merge branch 'cmaster-next' into vtysh-grammar
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com> Conflicts: ospfd/ospf_ri.c zebra/zebra_vty.c
Diffstat (limited to 'zebra/zebra_mpls_vty.c')
-rw-r--r--zebra/zebra_mpls_vty.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/zebra/zebra_mpls_vty.c b/zebra/zebra_mpls_vty.c
index 061bb244b..ff84c5943 100644
--- a/zebra/zebra_mpls_vty.c
+++ b/zebra/zebra_mpls_vty.c
@@ -52,6 +52,13 @@ zebra_mpls_transit_lsp (struct vty *vty, int add_cmd, const char *inlabel_str,
mpls_label_t label;
mpls_label_t in_label, out_label;
+ if (!mpls_enabled)
+ {
+ vty_out (vty, "%% MPLS not turned on in kernel, ignoring command%s",
+ VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
zvrf = vrf_info_lookup(VRF_DEFAULT);
if (!zvrf)
{
@@ -829,9 +836,6 @@ zebra_mpls_vty_init (void)
{
install_element (VIEW_NODE, &show_mpls_status_cmd);
- if (! mpls_enabled)
- return;
-
install_node (&mpls_node, zebra_mpls_config);
install_element (CONFIG_NODE, &ip_route_label_cmd);