From 41cebd7eff55c0cebe048dc8764ad5c69a6ee5ef Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 27 Jan 2017 16:17:08 -0500 Subject: [PATCH] bgpd: Fix crash in a vpn command Signed-off-by: Donald Sharp --- bgpd/bgp_route.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index ba95fd3cb9..a8217bca1e 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -7865,6 +7865,9 @@ bgp_show_route (struct vty *vty, struct bgp *bgp, const char *ip_str, int prefix_check, enum bgp_path_type pathtype, u_char use_json) { + if (!bgp) + bgp = bgp_get_default (); + return bgp_show_route_in_table (vty, bgp, bgp->rib[afi][safi], ip_str, afi, safi, prd, prefix_check, pathtype, use_json); -- 2.39.5