]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: evpn code was not properly unlocking rd_dest
authorDonald Sharp <sharpd@nvidia.com>
Fri, 11 Aug 2023 13:53:42 +0000 (09:53 -0400)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Sat, 12 Aug 2023 00:53:41 +0000 (00:53 +0000)
Found some code where bgp was not unlocking the dest
and rd_dest when walking the tree attempting to
find something to install.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 1e8ac95bfb757b85d02514dd0f708974cdc22899)

bgpd/bgp_evpn.c

index 16b7dc3f4ed4581c4908c89234cf480df0e876d7..5bfef67785f6d6013091f403ea15dd6044ca0b09 100644 (file)
@@ -3104,8 +3104,11 @@ static int install_uninstall_routes_for_vrf(struct bgp *bgp_vrf, int install)
                             pi = pi->next) {
                                ret = bgp_evpn_route_entry_install_if_vrf_match(
                                        bgp_vrf, pi, install);
-                               if (ret)
+                               if (ret) {
+                                       bgp_dest_unlock_node(rd_dest);
+                                       bgp_dest_unlock_node(dest);
                                        return ret;
+                               }
                        }
                }
        }