]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: additional neighbor message improvement
authorDon Slice <dslice@cumulusnetworks.com>
Thu, 24 May 2018 14:58:37 +0000 (10:58 -0400)
committerDon Slice <dslice@cumulusnetworks.com>
Thu, 24 May 2018 14:58:37 +0000 (10:58 -0400)
Added improved error message text to other places that could also
encounter the same condition.  In testing found that in certain
case, duplicate error messages were previously issued.  This fix
also removes the duplicates.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
bgpd/bgp_route.c

index 004bdb2ef498c7b18a7bd0c197280e02e04b4884..d0c2ff81866ee094adcc885ecac189eb4ce6ec1a 100644 (file)
@@ -9648,13 +9648,13 @@ static struct peer *peer_lookup_in_view(struct vty *vty, struct bgp *bgp,
                        json_object *json_no = NULL;
                        json_no = json_object_new_object();
                        json_object_string_add(json_no, "warning",
-                                              "No such neighbor");
+                                              "No such neighbor in this view/vrf");
                        vty_out(vty, "%s\n",
                                json_object_to_json_string_ext(
                                        json_no, JSON_C_TO_STRING_PRETTY));
                        json_object_free(json_no);
                } else
-                       vty_out(vty, "No such neighbor\n");
+                       vty_out(vty, "No such neighbor in this view/vrf\n");
                return NULL;
        }
 
@@ -10752,10 +10752,8 @@ DEFUN (show_ip_bgp_neighbor_routes,
        peerstr = argv[++idx]->arg;
 
        peer = peer_lookup_in_view(vty, bgp, peerstr, uj);
-       if (!peer) {
-               vty_out(vty, "No such neighbor\n");
+       if (!peer)
                return CMD_WARNING;
-       }
 
        if (argv_find(argv, argc, "flap-statistics", &idx))
                sh_type = bgp_show_type_flap_neighbor;