Skip to content

Commit

Permalink
bgpd: Fixup crash when leaking from default vrf for mpls vpn's
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
donaldsharp authored and ton31337 committed Sep 17, 2024
1 parent d3e76a4 commit b28ec43
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bgpd/bgp_mplsvpn.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit b28ec43

Please sign in to comment.