summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChirag Shah <chirag@cumulusnetworks.com>2017-08-10 19:13:36 +0200
committerChirag Shah <chirag@cumulusnetworks.com>2017-08-10 23:59:07 +0200
commit825d5fbf5912151be74560c11d178364fe6c0f3e (patch)
tree252284eb3c7d5ba61041a14db2e18dc97d4c5271 /lib
parentMerge pull request #952 from lunn/eigrpd-nbr-timer-crash (diff)
downloadfrr-825d5fbf5912151be74560c11d178364fe6c0f3e.tar.xz
frr-825d5fbf5912151be74560c11d178364fe6c0f3e.zip
lib: Fix multi instance ospf
ospfd crashes upon configuring multi-instance ospf i.e 'router ospf x'. ospfd can return CMD_NOT_MY_INSTANCE which is not supported in lib/commands Support two of the error codes CMD_NOT_MY_INSTANCE and CMD_WARNING_CONFIG_FAILED Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/command.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/command.c b/lib/command.c
index 077a72398..45b5593a3 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -1062,7 +1062,8 @@ int cmd_execute_command(vector vline, struct vty *vty,
if (vtysh)
return saved_ret;
- if (ret != CMD_SUCCESS && ret != CMD_WARNING) {
+ if (ret != CMD_SUCCESS && ret != CMD_WARNING
+ && ret != CMD_NOT_MY_INSTANCE && ret != CMD_WARNING_CONFIG_FAILED) {
/* This assumes all nodes above CONFIG_NODE are childs of
* CONFIG_NODE */
while (vty->node > CONFIG_NODE) {
@@ -1070,7 +1071,9 @@ int cmd_execute_command(vector vline, struct vty *vty,
vty->node = try_node;
ret = cmd_execute_command_real(vline, FILTER_RELAXED,
vty, cmd);
- if (ret == CMD_SUCCESS || ret == CMD_WARNING)
+ if (ret == CMD_SUCCESS || ret == CMD_WARNING
+ || ret == CMD_NOT_MY_INSTANCE
+ || ret == CMD_WARNING_CONFIG_FAILED)
return ret;
}
/* no command succeeded, reset the vty to the original node */
@@ -1134,6 +1137,8 @@ int command_config_read_one_line(struct vty *vty,
if (!(use_daemon && ret == CMD_SUCCESS_DAEMON)
&& !(!use_daemon && ret == CMD_ERR_NOTHING_TODO)
&& ret != CMD_SUCCESS && ret != CMD_WARNING
+ && ret != CMD_NOT_MY_INSTANCE
+ && ret != CMD_WARNING_CONFIG_FAILED
&& vty->node != CONFIG_NODE) {
saved_node = vty->node;