There is a memory leak of the bgp node (route node)
in bgp vrf rib table while processing evpn remote routes.
During the remote evpn route processing, a new route
is imported and created in per vrf bgp rib route table,
the refcount for the route node is incremented multiple
times.
Post evpn route creation, the bgp (route) node refcount needs
to be decremented.
Ticket:CM-26838,CM-27169
Reviewed By:CCR-9477
Testing Done:
Before fix:
----------
initial state:
TORC1#vtysh -c "show memory"
BGP node : 515 184
BGP route : 568 112
with 1 mac-ip route:
TORC1#vtysh -c "show memory"
BGP node : 524 184
BGP route : 583 112
withdraw 1 mac-ip route:
TORC1#vtysh -c "show memory"
BGP node : 520 184
BGP route : 568 112
After fix:
withdra 1 mac-ip route
TORC1#vtysh -c "show memory"
BGP node : 515 184
BGP route : 568 112
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
/* Process for route leaking. */
vpn_leak_from_vrf_update(bgp_get_default(), bgp_vrf, pi);
+ bgp_unlock_node(rn);
+
return ret;
}