]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Fix attribute handling for type-5 routes
authorvivek <vivek@cumulusnetworks.com>
Sat, 9 Dec 2017 00:36:27 +0000 (16:36 -0800)
committermitesh <mitesh@cumulusnetworks.com>
Wed, 24 Jan 2018 00:27:25 +0000 (16:27 -0800)
When a EVPN type-5 route is formed by using the source IP route's AS-path,
the AS-path is not locally generated and should not be "uninterned" (i.e.,
have its reference count incorrectly updated). An incorrect update of the
reference count can lead to asserts or crashes at a later stage.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Ticket: CM-19121
Reviewed By: CCR-7028
Testing Done:
1. Manual testing by Vivek and Anitha
2. No automation run since this area has no coverage yet

bgpd/bgp_evpn.c

index 70500f39d400400c741145ba181d6c1d2bf3969d..4e40daadb6eadd68b965cf7382776aee667bb68a 100644 (file)
@@ -1120,7 +1120,8 @@ static int update_evpn_type5_route(struct bgp *bgp_vrf,
        }
 
        /* uninten temporary */
-       aspath_unintern(&attr.aspath);
+       if (!src_attr)
+               aspath_unintern(&attr.aspath);
        return 0;
 }