summaryrefslogtreecommitdiff
path: root/lib/routemap.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2017-06-16 22:43:09 +0000
committerQuentin Young <qlyoung@cumulusnetworks.com>2017-06-16 22:43:09 +0000
commit98f224ef22bc9ec22b8be51756ae12e7740cbd5a (patch)
tree926dee5a3ecb17fa81b54f05cbc6250398040f55 /lib/routemap.c
parent62e4232010330e515630399838288f6281d04de6 (diff)
lib: improve routemap error messages
indicate which daemon was the source of the message and that it may be a question of daemon support rather than a malformed argument Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'lib/routemap.c')
-rw-r--r--lib/routemap.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/lib/routemap.c b/lib/routemap.c
index fcd3c7a7aa..17f25334a7 100644
--- a/lib/routemap.c
+++ b/lib/routemap.c
@@ -521,10 +521,12 @@ generic_match_add (struct vty *vty, struct route_map_index *index,
switch (ret)
{
case RMAP_RULE_MISSING:
- vty_out (vty, "%% Can't find rule.%s", VTY_NEWLINE);
+ vty_out (vty, "%% [%s] Can't find rule.%s", frr_protonameinst,
+ VTY_NEWLINE);
return CMD_WARNING;
case RMAP_COMPILE_ERROR:
- vty_out (vty, "%% Argument is malformed.%s", VTY_NEWLINE);
+ vty_out (vty, "%% [%s] Argument form is unsupported or malformed.%s",
+ frr_protonameinst, VTY_NEWLINE);
return CMD_WARNING;
}
}
@@ -567,10 +569,12 @@ generic_match_delete (struct vty *vty, struct route_map_index *index,
switch (ret)
{
case RMAP_RULE_MISSING:
- vty_out (vty, "%% BGP Can't find rule.%s", VTY_NEWLINE);
+ vty_out (vty, "%% [%s] Can't find rule.%s", frr_protonameinst,
+ VTY_NEWLINE);
break;
case RMAP_COMPILE_ERROR:
- vty_out (vty, "%% BGP Argument is malformed.%s", VTY_NEWLINE);
+ vty_out (vty, "%% [%s] Argument form is unsupported or malformed.%s",
+ frr_protonameinst, VTY_NEWLINE);
break;
}
if (dep_name)
@@ -603,10 +607,12 @@ generic_set_add (struct vty *vty, struct route_map_index *index,
switch (ret)
{
case RMAP_RULE_MISSING:
- vty_out (vty, "%% Can't find rule.%s", VTY_NEWLINE);
+ vty_out (vty, "%% [%s] Can't find rule.%s", frr_protonameinst,
+ VTY_NEWLINE);
return CMD_WARNING;
case RMAP_COMPILE_ERROR:
- vty_out (vty, "%% Argument is malformed.%s", VTY_NEWLINE);
+ vty_out (vty, "%% [%s] Argument form is unsupported or malformed.%s",
+ frr_protonameinst, VTY_NEWLINE);
return CMD_WARNING;
}
}
@@ -625,10 +631,12 @@ generic_set_delete (struct vty *vty, struct route_map_index *index,
switch (ret)
{
case RMAP_RULE_MISSING:
- vty_out (vty, "%% Can't find rule.%s", VTY_NEWLINE);
+ vty_out (vty, "%% [%s] Can't find rule.%s", frr_protonameinst,
+ VTY_NEWLINE);
return CMD_WARNING;
case RMAP_COMPILE_ERROR:
- vty_out (vty, "%% Argument is malformed.%s", VTY_NEWLINE);
+ vty_out (vty, "%% [%s] Argument form is unsupported or malformed.%s",
+ frr_protonameinst, VTY_NEWLINE);
return CMD_WARNING;
}
}