summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-01-27 16:17:08 -0500
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-01-27 16:17:08 -0500
commit41cebd7eff55c0cebe048dc8764ad5c69a6ee5ef (patch)
tree76f51553c180709de50759ee90e0d43d805c3e18
parent42afeb280ba27f4d4df74712893469a0c30f10a6 (diff)
bgpd: Fix crash in a vpn command
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
-rw-r--r--bgpd/bgp_route.c3
1 files changed, 3 insertions, 0 deletions
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);