From: Chirag Shah Date: Sat, 5 Aug 2017 05:55:20 +0000 (-0700) Subject: ospfd: Handle multi instance router ospf command X-Git-Tag: frr-4.0-dev~451^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=64ac44f6f0095039f93ee622207bb791c2da46c6;p=mirror%2Ffrr.git ospfd: Handle multi instance router ospf command Signed-off-by: Chirag Shah --- diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index f7a512951f..78f965abbf 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -135,6 +135,7 @@ DEFUN_NOSH (router_ospf, { struct ospf *ospf; u_short instance = 0; + int ret = CMD_SUCCESS; ospf = ospf_lookup(); if (!ospf) { @@ -147,9 +148,10 @@ DEFUN_NOSH (router_ospf, /* The following logic to set the vty qobj index is in place to be able to ignore the commands which dont belong to this instance. */ - if (ospf->instance != instance) + if (ospf->instance != instance) { VTY_PUSH_CONTEXT_NULL(OSPF_NODE); - else { + ret = CMD_NOT_MY_INSTANCE; + } else { if (IS_DEBUG_OSPF_EVENT) zlog_debug("Config command 'router ospf %d' received", instance); @@ -158,7 +160,7 @@ DEFUN_NOSH (router_ospf, ospf_router_id_update(ospf); } - return CMD_SUCCESS; + return ret; } DEFUN (no_router_ospf,