]> git.puffer.fish Git - matthieu/frr.git/commitdiff
BGP: Fix source route type in redistributed route
authorvivek <vivek@cumulusnetworks.com>
Mon, 28 Sep 2015 19:27:17 +0000 (12:27 -0700)
committervivek <vivek@cumulusnetworks.com>
Mon, 28 Sep 2015 19:27:17 +0000 (12:27 -0700)
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>
bgpd/bgp_route.c

index efcaf231507edd8685e96293253c6a4a2abb5903..b569aef6d9ada4da03f57b7cb469246a4e7a0274 100644 (file)
@@ -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))
                {