From: vivek Date: Mon, 28 Sep 2015 19:27:17 +0000 (-0700) Subject: BGP: Fix source route type in redistributed route X-Git-Tag: frr-2.0-rc1~1243^2~2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=1844fdbd7f3ad9e2a56652331f3833a7c44e69c4;p=matthieu%2Ffrr.git BGP: Fix source route type in redistributed route Ticket: CM-7593 Reviewed By: CCR-3563 Testing Done: Manual verification of failed scenario (2.5-br) When BGP receives an update to a redistributed route and the type of the source has changed (e.g., from OSPF to static), the source route type is not being updated in the RIB entry. This can lead to problems such as the route being incorrectly deleted if redistribution for the prior source is unconfigured. Fix the code to update the source route type. Signed-off-by: Vivek Venkatraman Reviewed-by: Donald Sharp Reviewed-by: Vipin Kumar --- diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index efcaf23150..b569aef6d9 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -6362,6 +6362,8 @@ bgp_redistribute_add (struct prefix *p, const struct in_addr *nexthop, if (bi) { + /* Ensure the (source route) type is updated. */ + bi->type = type; if (attrhash_cmp (bi->attr, new_attr) && !CHECK_FLAG(bi->flags, BGP_INFO_REMOVED)) {