From b28ec439d1330e704a6247d2035f378f31105d63 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 19 Jul 2021 10:29:42 -0400 Subject: [PATCH] bgpd: Fixup crash when leaking from default vrf for mpls vpn's When we get a update on a route that we already have information on from another router and that route has been leaked ensure that we do not crash when trying to releak the code when we may want to modify the as path. Signed-off-by: Donald Sharp --- bgpd/bgp_mplsvpn.c | 1 + 1 file changed, 1 insertion(+) diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c index 4e5a4150d1f6..13da55ffb770 100644 --- a/bgpd/bgp_mplsvpn.c +++ b/bgpd/bgp_mplsvpn.c @@ -2399,6 +2399,7 @@ static void vpn_leak_to_vrf_update_onevrf(struct bgp *to_bgp, /* to */ * detection */ if (path_vpn->extra && path_vpn->extra->vrfleak && + path_vpn->extra->vrfleak->bgp_orig && (to_bgp->as != path_vpn->extra->vrfleak->bgp_orig->as)) { new_aspath = aspath_dup(static_attr.aspath); new_aspath =