summaryrefslogtreecommitdiffstats
path: root/babeld
diff options
context:
space:
mode:
authorDaniel Walton <dwalton@cumulusnetworks.com>2017-07-13 21:56:08 +0200
committerDaniel Walton <dwalton@cumulusnetworks.com>2017-07-13 21:56:08 +0200
commitf1a05de982b2466907838a7e74d7d15ad4060db2 (patch)
treea41d430cf69e6603accec78238c8d86d59a389ad /babeld
parentMerge pull request #807 from Jafaral/qua2frr (diff)
downloadfrr-f1a05de982b2466907838a7e74d7d15ad4060db2.tar.xz
frr-f1a05de982b2466907838a7e74d7d15ad4060db2.zip
vtysh: return non-zero for configuration failures
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> This allows frr-reload.py (or anything else that scripts via vtysh) to know if the vtysh command worked or hit an error.
Diffstat (limited to 'babeld')
-rw-r--r--babeld/babel_interface.c4
-rw-r--r--babeld/babel_zebra.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/babeld/babel_interface.c b/babeld/babel_interface.c
index fe8fde92e..d14c4d847 100644
--- a/babeld/babel_interface.c
+++ b/babeld/babel_interface.c
@@ -292,7 +292,7 @@ DEFUN (babel_network,
if (ret < 0) {
vty_outln (vty, "There is same network configuration %s",
argv[1]->arg);
- return CMD_WARNING;
+ return CMD_WARNING_CONFIG_FAILED;
}
return CMD_SUCCESS;
@@ -319,7 +319,7 @@ DEFUN (no_babel_network,
if (ret < 0) {
vty_outln (vty, "can't find network %s",argv[2]->arg);
- return CMD_WARNING;
+ return CMD_WARNING_CONFIG_FAILED;
}
return CMD_SUCCESS;
diff --git a/babeld/babel_zebra.c b/babeld/babel_zebra.c
index 3a7a52ccc..4e96198e0 100644
--- a/babeld/babel_zebra.c
+++ b/babeld/babel_zebra.c
@@ -223,7 +223,7 @@ DEFUN (babel_redistribute_type,
if (type < 0) {
vty_outln (vty, "Invalid type %s", argv[1]->arg);
- return CMD_WARNING;
+ return CMD_WARNING_CONFIG_FAILED;
}
zclient_redistribute (ZEBRA_REDISTRIBUTE_ADD, zclient, AFI_IP, type, 0, VRF_DEFAULT);
@@ -244,7 +244,7 @@ DEFUN (no_babel_redistribute_type,
if (type < 0) {
vty_outln (vty, "Invalid type %s", argv[2]->arg);
- return CMD_WARNING;
+ return CMD_WARNING_CONFIG_FAILED;
}
zclient_redistribute (ZEBRA_REDISTRIBUTE_DELETE, zclient, AFI_IP, type, 0, VRF_DEFAULT);
@@ -279,7 +279,7 @@ DEFUN (debug_babel,
vty_outln (vty, "Invalid type %s", argv[2]->arg);
- return CMD_WARNING;
+ return CMD_WARNING_CONFIG_FAILED;
}
/* [Babel Command] */
@@ -309,7 +309,7 @@ DEFUN (no_debug_babel,
vty_outln (vty, "Invalid type %s", argv[3]->arg);
- return CMD_WARNING;
+ return CMD_WARNING_CONFIG_FAILED;
}
#endif /* NO_DEBUG */