]> git.puffer.fish Git - mirror/frr.git/commit
bgpd: fix memory usage of vpn no retain
authorLouis Scalbert <louis.scalbert@6wind.com>
Tue, 6 Jun 2023 10:46:21 +0000 (12:46 +0200)
committerLouis Scalbert <louis.scalbert@6wind.com>
Fri, 16 Jun 2023 12:18:25 +0000 (14:18 +0200)
commit3cc70b02a9e19a364f3144031f27f3e50f128c0c
tree25ba00172506af660b838289d128f75a5c34a1b0
parent59bbe85d4bb0bf11f9c78aa4e7bee5023bc33400
bgpd: fix memory usage of vpn no retain

By default, bgpd stores all MPLS VPN SAFI prefixes unless the "no bgp
retain route-target all" option is used to store only prefixes that are
imported into local VRFs. The "no retain" option temporarily uses too
much memory, as all prefixes are stored in memory before the deletion of
non-imported prefixes is done.

Filter out non-imported prefixes before they are set into the BGP adj
RIB out.

Fixes: a486300b26 ("bgpd: implement retain route-target all behaviour")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
bgpd/bgp_mplsvpn.c
bgpd/bgp_mplsvpn.h
bgpd/bgp_route.c