diff options
author | Chirag Shah <chirag@cumulusnetworks.com> | 2017-08-04 01:34:17 +0200 |
---|---|---|
committer | Chirag Shah <chirag@cumulusnetworks.com> | 2017-08-05 03:03:45 +0200 |
commit | ac28e4ecaf5f8821d573ff1a3b8b7e95df5dd3ce (patch) | |
tree | 9c5dddb21ad63a8fb75dea33fe54e11c56e62453 /ospfd/ospf_dump.c | |
parent | ospfd: Fix MI-OSPF configuraton clis (diff) | |
download | frr-ac28e4ecaf5f8821d573ff1a3b8b7e95df5dd3ce.tar.xz frr-ac28e4ecaf5f8821d573ff1a3b8b7e95df5dd3ce.zip |
ospfd: Fix MI-OSPF CLIs
Handle all instance base clis calling ospf_lookup_instance()
to return CMD_NOT_MY_INSTANCE in case of ospf is not found.
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
Diffstat (limited to 'ospfd/ospf_dump.c')
-rw-r--r-- | ospfd/ospf_dump.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ospfd/ospf_dump.c b/ospfd/ospf_dump.c index c0670012b..d3d1ffed5 100644 --- a/ospfd/ospf_dump.c +++ b/ospfd/ospf_dump.c @@ -626,7 +626,7 @@ DEFUN (debug_ospf_packet, if (inst) // user passed instance ID { if (!ospf_lookup_instance(strtoul(argv[2]->arg, NULL, 10))) - return CMD_SUCCESS; + return CMD_NOT_MY_INSTANCE; } int type = 0; @@ -702,7 +702,7 @@ DEFUN (no_debug_ospf_packet, if (inst) // user passed instance ID { if (!ospf_lookup_instance(strtoul(argv[3]->arg, NULL, 10))) - return CMD_SUCCESS; + return CMD_NOT_MY_INSTANCE; } int type = 0; @@ -773,7 +773,7 @@ DEFUN (debug_ospf_ism, if (inst) // user passed instance ID { if (!ospf_lookup_instance(strtoul(argv[2]->arg, NULL, 10))) - return CMD_SUCCESS; + return CMD_NOT_MY_INSTANCE; } if (vty->node == CONFIG_NODE) { @@ -824,7 +824,7 @@ DEFUN (no_debug_ospf_ism, if (inst) // user passed instance ID { if (!ospf_lookup_instance(strtoul(argv[3]->arg, NULL, 10))) - return CMD_SUCCESS; + return CMD_NOT_MY_INSTANCE; } if (vty->node == CONFIG_NODE) { @@ -991,7 +991,7 @@ DEFUN (no_debug_ospf_instance_nsm, instance = strtoul(argv[idx_number]->arg, NULL, 10); if (!ospf_lookup_instance(instance)) - return CMD_SUCCESS; + return CMD_NOT_MY_INSTANCE; return no_debug_ospf_nsm_common(vty, 5, argc, argv); } @@ -1065,7 +1065,7 @@ DEFUN (debug_ospf_instance_lsa, instance = strtoul(argv[idx_number]->arg, NULL, 10); if (!ospf_lookup_instance(instance)) - return CMD_SUCCESS; + return CMD_NOT_MY_INSTANCE; return debug_ospf_lsa_common(vty, 4, argc, argv); } @@ -1141,7 +1141,7 @@ DEFUN (no_debug_ospf_instance_lsa, instance = strtoul(argv[idx_number]->arg, NULL, 10); if (!ospf_lookup_instance(instance)) - return CMD_SUCCESS; + return CMD_NOT_MY_INSTANCE; return no_debug_ospf_lsa_common(vty, 5, argc, argv); } @@ -1203,7 +1203,7 @@ DEFUN (debug_ospf_instance_zebra, instance = strtoul(argv[idx_number]->arg, NULL, 10); if (!ospf_lookup_instance(instance)) - return CMD_SUCCESS; + return CMD_NOT_MY_INSTANCE; return debug_ospf_zebra_common(vty, 4, argc, argv); } |