summaryrefslogtreecommitdiff
path: root/zebra/zebra_vty.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_vty.c')
-rw-r--r--zebra/zebra_vty.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/zebra/zebra_vty.c b/zebra/zebra_vty.c
index 6002b0d6fa..6a43da39b3 100644
--- a/zebra/zebra_vty.c
+++ b/zebra/zebra_vty.c
@@ -118,6 +118,12 @@ zebra_static_ipv4 (struct vty *vty, safi_t safi, int add_cmd,
/* Labels */
if (label_str)
{
+ if (!mpls_enabled)
+ {
+ vty_out (vty, "%% MPLS not turned on in kernel, ignoring command%s",
+ VTY_NEWLINE);
+ return CMD_WARNING;
+ }
if (mpls_str2label (label_str, &snh_label.num_labels,
snh_label.label))
{