summaryrefslogtreecommitdiffstats
path: root/vrrpd/vrrp_vty.c
diff options
context:
space:
mode:
Diffstat (limited to 'vrrpd/vrrp_vty.c')
-rw-r--r--vrrpd/vrrp_vty.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/vrrpd/vrrp_vty.c b/vrrpd/vrrp_vty.c
index f438c2489..4c5ce7f85 100644
--- a/vrrpd/vrrp_vty.c
+++ b/vrrpd/vrrp_vty.c
@@ -61,7 +61,11 @@ DEFUN(vrrp_vrid,
vrid = strtoul(argv[idx]->arg, NULL, 10);
struct vrrp_vrouter *vr = vrrp_vrouter_create(ifp, vrid);
- vrrp_event(vr, VRRP_EVENT_STARTUP);
+ int ret = vrrp_event(vr, VRRP_EVENT_STARTUP);
+ if (ret < 0) {
+ vty_out(vty, "%% Failed to start VRRP instance\n");
+ return CMD_WARNING_CONFIG_FAILED;
+ }
return CMD_SUCCESS;
}
@@ -76,5 +80,6 @@ void vrrp_vty_init(void)
install_node(&interface_node, NULL);
if_cmd_init();
install_element(VIEW_NODE, &show_debugging_vrrpd_cmd);
+ install_element(ENABLE_NODE, &show_debugging_vrrpd_cmd);
install_element(INTERFACE_NODE, &vrrp_vrid_cmd);
}