]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: clarify evpn datastruct use for SA 5217/head
authorMark Stapp <mjs@voltanet.io>
Wed, 23 Oct 2019 15:56:35 +0000 (11:56 -0400)
committerMark Stapp <mjs@voltanet.io>
Wed, 23 Oct 2019 15:56:35 +0000 (11:56 -0400)
Clear up an SA report by clarifying a function call in the evpn
code.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
bgpd/bgp_evpn.c

index 3f2f11dbe237781d1c1c55f5fef6893fc8a9092f..07d3f7b31e14db4b750c67ab3c84fb0340dc581d 100644 (file)
@@ -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);