summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_bfd.c
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 /bgpd/bgp_bfd.c
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 'bgpd/bgp_bfd.c')
-rw-r--r--bgpd/bgp_bfd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/bgpd/bgp_bfd.c b/bgpd/bgp_bfd.c
index 890acb3a4..1aa2b93a9 100644
--- a/bgpd/bgp_bfd.c
+++ b/bgpd/bgp_bfd.c
@@ -562,7 +562,7 @@ DEFUN (neighbor_bfd,
peer = peer_and_group_lookup_vty (vty, argv[idx_peer]->arg);
if (! peer)
- return CMD_WARNING;
+ return CMD_WARNING_CONFIG_FAILED;
ret = bgp_bfd_peer_param_set (peer, BFD_DEF_MIN_RX, BFD_DEF_MIN_TX,
BFD_DEF_DETECT_MULT, 1);
@@ -595,7 +595,7 @@ DEFUN (neighbor_bfd_param,
peer = peer_and_group_lookup_vty (vty, argv[idx_peer]->arg);
if (!peer)
- return CMD_WARNING;
+ return CMD_WARNING_CONFIG_FAILED;
if ((ret = bfd_validate_param (vty, argv[idx_number_1]->arg, argv[idx_number_2]->arg, argv[idx_number_3]->arg, &dm_val,
&rx_val, &tx_val)) != CMD_SUCCESS)
@@ -626,14 +626,14 @@ DEFUN_HIDDEN (neighbor_bfd_type,
peer = peer_and_group_lookup_vty (vty, argv[idx_peer]->arg);
if (!peer)
- return CMD_WARNING;
+ return CMD_WARNING_CONFIG_FAILED;
if (strmatch(argv[idx_hop]->text, "singlehop"))
type = BFD_TYPE_SINGLEHOP;
else if (strmatch(argv[idx_hop]->text, "multihop"))
type = BFD_TYPE_MULTIHOP;
else
- return CMD_WARNING;
+ return CMD_WARNING_CONFIG_FAILED;
ret = bgp_bfd_peer_param_type_set (peer, type);
if (ret != 0)
@@ -659,7 +659,7 @@ DEFUN (no_neighbor_bfd,
peer = peer_and_group_lookup_vty (vty, argv[idx_peer]->arg);
if (! peer)
- return CMD_WARNING;
+ return CMD_WARNING_CONFIG_FAILED;
ret = bgp_bfd_peer_param_unset(peer);
if (ret != 0)
@@ -685,7 +685,7 @@ DEFUN_HIDDEN (no_neighbor_bfd_type,
peer = peer_and_group_lookup_vty (vty, argv[idx_peer]->arg);
if (! peer)
- return CMD_WARNING;
+ return CMD_WARNING_CONFIG_FAILED;
if (!peer->bfd_info)
return 0;