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 <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Vipin Kumar <vipin@cumulusnetworks.com>
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))
{