]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: Fix vrf check output to only have 1 line 2758/head
authorDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 31 Jul 2018 19:28:04 +0000 (15:28 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 2 Aug 2018 14:09:09 +0000 (10:09 -0400)
When we issue this command, we are getting:

robot# show ip route vrf green json
{}
% VRF green not found
robot# show ip route vrf green
% VRF green not found
% VRF green not found
robot#

Fix the command so it only displays one line of output
for json or non-json output.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
lib/vrf.h

index 88536eada89e25ea38602e55932803ceadb8cf38..0f4f36be507a4172e6d58d7123370f4990b6e1da 100644 (file)
--- a/lib/vrf.h
+++ b/lib/vrf.h
@@ -120,7 +120,6 @@ extern vrf_id_t vrf_name_to_id(const char *);
                        } else {                                               \
                                vty_out(vty, "%% VRF %s not found\n", NAME);   \
                        }                                                      \
-                       vty_out(vty, "%% VRF %s not found\n", NAME);           \
                        return CMD_WARNING;                                    \
                }                                                              \
                if (vrf->vrf_id == VRF_UNKNOWN) {                              \