summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_mpls_vty.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_mpls_vty.c')
-rw-r--r--zebra/zebra_mpls_vty.c56
1 files changed, 26 insertions, 30 deletions
diff --git a/zebra/zebra_mpls_vty.c b/zebra/zebra_mpls_vty.c
index 56f3e5196..6c2dbca3a 100644
--- a/zebra/zebra_mpls_vty.c
+++ b/zebra/zebra_mpls_vty.c
@@ -53,21 +53,20 @@ zebra_mpls_transit_lsp (struct vty *vty, int add_cmd, const char *inlabel_str,
if (!mpls_enabled)
{
- vty_out (vty, "%% MPLS not turned on in kernel, ignoring command%s",
- VTY_NEWLINE);
+ vty_outln (vty,"%% MPLS not turned on in kernel, ignoring command");
return CMD_WARNING;
}
zvrf = vrf_info_lookup(VRF_DEFAULT);
if (!zvrf)
{
- vty_out (vty, "%% Default VRF does not exist%s", VTY_NEWLINE);
+ vty_outln (vty, "%% Default VRF does not exist");
return CMD_WARNING;
}
if (!inlabel_str)
{
- vty_out (vty, "%% No Label Information%s", VTY_NEWLINE);
+ vty_outln (vty, "%% No Label Information");
return CMD_WARNING;
}
@@ -75,7 +74,7 @@ zebra_mpls_transit_lsp (struct vty *vty, int add_cmd, const char *inlabel_str,
label = atoi(inlabel_str);
if (!IS_MPLS_UNRESERVED_LABEL(label))
{
- vty_out (vty, "%% Invalid label%s", VTY_NEWLINE);
+ vty_outln (vty, "%% Invalid label");
return CMD_WARNING;
}
@@ -83,12 +82,12 @@ zebra_mpls_transit_lsp (struct vty *vty, int add_cmd, const char *inlabel_str,
{
if (!gate_str)
{
- vty_out (vty, "%% No Nexthop Information%s", VTY_NEWLINE);
+ vty_outln (vty, "%% No Nexthop Information");
return CMD_WARNING;
}
if (!outlabel_str)
{
- vty_out (vty, "%% No Outgoing label Information%s", VTY_NEWLINE);
+ vty_outln (vty, "%% No Outgoing label Information");
return CMD_WARNING;
}
}
@@ -109,7 +108,7 @@ zebra_mpls_transit_lsp (struct vty *vty, int add_cmd, const char *inlabel_str,
gtype = NEXTHOP_TYPE_IPV4;
else
{
- vty_out (vty, "%% Invalid nexthop%s", VTY_NEWLINE);
+ vty_outln (vty, "%% Invalid nexthop");
return CMD_WARNING;
}
}
@@ -134,8 +133,7 @@ zebra_mpls_transit_lsp (struct vty *vty, int add_cmd, const char *inlabel_str,
if (!zebra_mpls_lsp_label_consistent (zvrf, in_label, out_label, gtype,
&gate, 0))
{
- vty_out (vty, "%% Label value not consistent%s",
- VTY_NEWLINE);
+ vty_outln (vty,"%% Label value not consistent");
return CMD_WARNING;
}
#endif /* HAVE_CUMULUS */
@@ -148,8 +146,8 @@ zebra_mpls_transit_lsp (struct vty *vty, int add_cmd, const char *inlabel_str,
if (ret)
{
- vty_out (vty, "%% LSP cannot be %s%s",
- add_cmd ? "added" : "deleted", VTY_NEWLINE);
+ vty_outln (vty, "%% LSP cannot be %s",
+ add_cmd ? "added" : "deleted");
return CMD_WARNING;
}
@@ -220,7 +218,7 @@ zebra_mpls_bind (struct vty *vty, int add_cmd, const char *prefix,
zvrf = vrf_info_lookup(VRF_DEFAULT);
if (!zvrf)
{
- vty_out (vty, "%% Default VRF does not exist%s", VTY_NEWLINE);
+ vty_outln (vty, "%% Default VRF does not exist");
return CMD_WARNING;
}
@@ -228,7 +226,7 @@ zebra_mpls_bind (struct vty *vty, int add_cmd, const char *prefix,
ret = str2prefix(prefix, &p);
if (ret <= 0)
{
- vty_out (vty, "%% Malformed address%s", VTY_NEWLINE);
+ vty_outln (vty, "%% Malformed address");
return CMD_WARNING;
}
@@ -236,7 +234,7 @@ zebra_mpls_bind (struct vty *vty, int add_cmd, const char *prefix,
{
if (!label_str)
{
- vty_out (vty, "%% No label binding specified%s", VTY_NEWLINE);
+ vty_outln (vty, "%% No label binding specified");
return CMD_WARNING;
}
@@ -254,13 +252,12 @@ zebra_mpls_bind (struct vty *vty, int add_cmd, const char *prefix,
label = atoi(label_str);
if (!IS_MPLS_UNRESERVED_LABEL(label))
{
- vty_out (vty, "%% Invalid label%s", VTY_NEWLINE);
+ vty_outln (vty, "%% Invalid label");
return CMD_WARNING;
}
if (zebra_mpls_label_already_bound (zvrf, label))
{
- vty_out (vty, "%% Label already bound to a FEC%s",
- VTY_NEWLINE);
+ vty_outln (vty,"%% Label already bound to a FEC");
return CMD_WARNING;
}
}
@@ -272,8 +269,8 @@ zebra_mpls_bind (struct vty *vty, int add_cmd, const char *prefix,
if (ret)
{
- vty_out (vty, "%% FEC to label binding cannot be %s%s",
- add_cmd ? "added" : "deleted", VTY_NEWLINE);
+ vty_outln (vty, "%% FEC to label binding cannot be %s",
+ add_cmd ? "added" : "deleted");
return CMD_WARNING;
}
@@ -877,7 +874,7 @@ DEFUN (show_mpls_fec,
ret = str2prefix(argv[3]->arg, &p);
if (ret <= 0)
{
- vty_out (vty, "%% Malformed address%s", VTY_NEWLINE);
+ vty_outln (vty, "%% Malformed address");
return CMD_WARNING;
}
zebra_mpls_print_fec (vty, zvrf, &p);
@@ -928,8 +925,8 @@ DEFUN (show_mpls_status,
"MPLS information\n"
"MPLS status\n")
{
- vty_out (vty, "MPLS support enabled: %s%s", (mpls_enabled) ? "yes" :
- "no (mpls kernel extensions not detected)", VTY_NEWLINE);
+ vty_outln (vty, "MPLS support enabled: %s",
+ (mpls_enabled) ? "yes" : "no (mpls kernel extensions not detected)");
return CMD_SUCCESS;
}
@@ -945,7 +942,7 @@ zebra_mpls_global_block (struct vty *vty, int add_cmd,
zvrf = zebra_vrf_lookup_by_id(VRF_DEFAULT);
if (!zvrf)
{
- vty_out (vty, "%% Default VRF does not exist%s", VTY_NEWLINE);
+ vty_outln (vty, "%% Default VRF does not exist");
return CMD_WARNING;
}
@@ -953,7 +950,7 @@ zebra_mpls_global_block (struct vty *vty, int add_cmd,
{
if (!start_label_str || !end_label_str)
{
- vty_out (vty, "%% Labels not specified%s", VTY_NEWLINE);
+ vty_outln (vty, "%% Labels not specified");
return CMD_WARNING;
}
@@ -962,13 +959,12 @@ zebra_mpls_global_block (struct vty *vty, int add_cmd,
if (!IS_MPLS_UNRESERVED_LABEL(start_label) ||
!IS_MPLS_UNRESERVED_LABEL(end_label))
{
- vty_out (vty, "%% Invalid label%s", VTY_NEWLINE);
+ vty_outln (vty, "%% Invalid label");
return CMD_WARNING;
}
if (end_label < start_label)
{
- vty_out (vty, "%% End label is less than Start label%s",
- VTY_NEWLINE);
+ vty_outln (vty,"%% End label is less than Start label");
return CMD_WARNING;
}
@@ -979,8 +975,8 @@ zebra_mpls_global_block (struct vty *vty, int add_cmd,
if (ret)
{
- vty_out (vty, "%% Global label block could not be %s%s",
- add_cmd ? "added" : "deleted", VTY_NEWLINE);
+ vty_outln (vty, "%% Global label block could not be %s",
+ add_cmd ? "added" : "deleted");
return CMD_WARNING;
}