summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvivek <vivek@cumulusnetworks.com>2017-12-08 16:36:27 -0800
committermitesh <mitesh@cumulusnetworks.com>2018-01-23 16:27:25 -0800
commit5ee65f6f3e6e6e9911753cd3c8d70a39b649bed4 (patch)
tree8b196151665c0b03231509ff06953a93953ce841
parentd4454626490f9f0b8d1efec36feefdd3ad10dd45 (diff)
bgpd: Fix attribute handling for type-5 routes
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
-rw-r--r--bgpd/bgp_evpn.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bgpd/bgp_evpn.c b/bgpd/bgp_evpn.c
index 70500f39d4..4e40daadb6 100644
--- a/bgpd/bgp_evpn.c
+++ b/bgpd/bgp_evpn.c
@@ -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;
}