Skip to content

Commit

Permalink
Merge pull request #5217 from mjstapp/fix_bgp_evpn_pi
Browse files Browse the repository at this point in the history
bgpd: clarify evpn datastruct use for SA
  • Loading branch information
rwestphal committed Oct 24, 2019
2 parents 5d98d94 + bd0254a commit 9951e1c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bgpd/bgp_evpn.c
Original file line number Diff line number Diff line change
Expand Up @@ -2608,9 +2608,10 @@ static int install_evpn_route_entry(struct bgp *bgp, struct bgpevpn *vpn,
&& (struct bgp_path_info *)pi->extra->parent == parent_pi)
break;

if (!pi)
pi = bgp_create_evpn_bgp_path_info(parent_pi, rn);
else {
if (!pi) {
/* Create an info */
(void)bgp_create_evpn_bgp_path_info(parent_pi, rn);
} else {
if (attrhash_cmp(pi->attr, parent_pi->attr)
&& !CHECK_FLAG(pi->flags, BGP_PATH_REMOVED)) {
bgp_unlock_node(rn);
Expand Down

0 comments on commit 9951e1c

Please sign in to comment.