]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: fix lcommunity refs in table-map 1116/head
authorDavid Lamparter <equinox@opensourcerouting.org>
Thu, 7 Sep 2017 12:51:00 +0000 (14:51 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Thu, 7 Sep 2017 12:51:00 +0000 (14:51 +0200)
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 <equinox@opensourcerouting.org>
bgpd/bgp_attr.c

index 795eee5d1644eb61dfd4ac81efcb2b48f4648e3c..d79cdef10c73fa9f32dc374c57d10ff37240819b 100644 (file)
@@ -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)