Ticket: CM-7113
Reviewed By: CCR-3458
Testing Done: Manual testing, failed test, bgpsmoke (on 2.5-br)
This is a port of patch bgpd-update-groups-fix-default-originate.patch
from 2.5-br.
Even though default origination is configured for a BGP neighbor through
"neighbor default-originate" or "peer-group default-originate", the neighbor
may sometimes not receive the default route in some situations. Change to
ensure update subgroups also differentiate on default-originate sent status.
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Vipin Kumar <vipin@cumulusnetworks.com>
UPDGRP_FOREACH_SUBGRP (updgrp, subgrp)
{
- if (subgrp->version != version)
+ if (subgrp->version != version ||
+ CHECK_FLAG(subgrp->sflags, SUBGRP_STATUS_DEFAULT_ORIGINATE))
continue;
/*
if (subgrp->version != target->version)
return 0;
+ if (CHECK_FLAG(subgrp->sflags, SUBGRP_STATUS_DEFAULT_ORIGINATE) !=
+ CHECK_FLAG(target->sflags, SUBGRP_STATUS_DEFAULT_ORIGINATE))
+ return 0;
+
/*
* If there are any adv entries on the target, then its adj-out (the
* set of advertised routes) does not match that of the other