From: David Lamparter Date: Thu, 7 Sep 2017 12:51:00 +0000 (+0200) Subject: bgpd: fix lcommunity refs in table-map X-Git-Tag: frr-3.0-rc2~10^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F1116%2Fhead;p=mirror%2Ffrr.git bgpd: fix lcommunity refs in table-map bgp_attr_deep_dup() needs to be removed just like bgp_attr_refcount(), but that's a little too intrusive for the 3.0 branch at this point. Signed-off-by: David Lamparter --- diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c index 795eee5d16..d79cdef10c 100644 --- a/bgpd/bgp_attr.c +++ b/bgpd/bgp_attr.c @@ -551,6 +551,9 @@ void bgp_attr_deep_dup(struct attr *new, struct attr *orig) if (orig->extra->ecommunity) new->extra->ecommunity = ecommunity_dup(orig->extra->ecommunity); + if (orig->extra->lcommunity) + new->extra->lcommunity = + lcommunity_dup(orig->extra->lcommunity); if (orig->extra->cluster) new->extra->cluster = cluster_dup(orig->extra->cluster); if (orig->extra->transit) @@ -577,6 +580,8 @@ void bgp_attr_deep_free(struct attr *attr) if (attr->extra) { if (attr->extra->ecommunity) ecommunity_free(&attr->extra->ecommunity); + if (attr->extra->lcommunity) + lcommunity_free(&attr->extra->lcommunity); if (attr->extra->cluster) cluster_free(attr->extra->cluster); if (attr->extra->transit)