Commit 8d2296b3b4 for frr
commit 8d2296b3b42ddf3602fa184ccbba2174df578802
Author: Nageswara Soma <nsoma@cisco.com>
Date: Fri Nov 20 19:31:57 2026 -0800
bgpd: fix refresh reply lost to duplicate suppression
A normal route reprocess can see the same attributes
as both the last advertisement and a queued forced
refresh reply. Duplicate suppression then cancels
that reply, so the receiver removes the stale route
when the end-of-refresh marker arrives.
Keep a matching queued advertisement while still
canceling a queued withdrawal or differing update
when the route returns to its previously sent state.
Signed-off-by: Nageswara Soma <nsoma@cisco.com>
diff --git a/bgpd/bgp_updgrp_adv.c b/bgpd/bgp_updgrp_adv.c
index 5e4224b700..5fdeef53fc 100644
--- a/bgpd/bgp_updgrp_adv.c
+++ b/bgpd/bgp_updgrp_adv.c
@@ -615,11 +615,13 @@ bool bgp_adj_out_set_subgroup(struct bgp_dest *dest,
}
/*
- * If this is a duplicate of the update that was sent out,
- * clean up the queued update, regardless whether it is a
- * withdraw or an advertisement.
+ * Cancel queued state that differs from the update already sent.
+ * Keep a matching queued advertisement: a forced route-refresh
+ * reply must still be sent even when normal processing sees a
+ * duplicate before that reply leaves the queue.
*/
- if (adj->adv && (attr_new == adj->attr)) {
+ if (adj->adv && attr_new == adj->attr &&
+ (!adj->adv->baa || attr_new != adj->adv->baa->attr)) {
if (debug) {
zlog_debug("%s delete queued UPDATE (%s:%u:%u)%pBD, afi=%s, safi=%s",
peer->host, dv.name, dv.id, dv.table_id, dest,