]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: fix for leaked struct bgp_adj_[in|out] on peer shutdown
authorJorge Boncompte [DTI2] <jorge@dti2.net>
Mon, 7 May 2012 15:17:33 +0000 (15:17 +0000)
committerDavid Lamparter <equinox@opensourcerouting.org>
Mon, 14 Jan 2013 13:42:38 +0000 (14:42 +0100)
    If a peer with soft-reconfiguration configured is cleared, the
function bgp_clear_route_table() doesn't free the bgp_adj_in and bgp_adj_out
structures of route nodes that for some reason, ej. denied by a filter,
don't have routes attached "rn->info == NULL".

Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
Reviewed-by: Leonid Rosenboim <Leonid.Rosenboim@windriver.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
bgpd/bgp_route.c

index 2412503d3b9145e8ec3d07bce97c4af60d9f4135..9251d2c22fb85be6c11ac2e7c77e71c8c45b39ed 100644 (file)
@@ -2810,9 +2810,6 @@ bgp_clear_route_table (struct peer *peer, afi_t afi, safi_t safi,
       struct bgp_info *ri;
       struct bgp_adj_in *ain;
       struct bgp_adj_out *aout;
-      
-      if (rn->info == NULL)
-        continue;
 
       /* XXX:TODO: This is suboptimal, every non-empty route_node is
        * queued for every clearing peer, regardless of whether it is