From: Theo Buehler Subject: Re: bgpd: adjust peer_dump to properly blast updates out To: tech@openbsd.org Date: Wed, 20 May 2026 20:06:24 +0200 On Wed, May 20, 2026 at 05:57:58PM +0200, Claudio Jeker wrote: > I replaced the peer_blast() call in peer_dump_done() with calling > peer_blast_done() instead. The idea was that peer_dump() already does all > the pend_prefix_add() calls and so peer_blast() just redoes all the work. > > This is true for most cases but there is the case where peer_up() calls > peer_dump() with a pre-populated (cached) Adj-RIB-Out. In that case it is > possible that peer_dump() via peer_generate_update and up_generate_updates > does not really alter the Adj-RIB-Out entry and in that case > adjout_prefix_update() will simply skip sending an update out. > > I don't want to walk the RIB twice for peer_up() calls so instead add a > force_update flag to adjout_prefix_update() and all callers upwards. > This way peer_dump_upcall() can call peer_generate_update() with > force_update set to true which ensures that all prefixes call > pend_prefix_add(). > > I switched up_generate_default() to always send one update (since it is > just one) so this code can now also use peer_blast_done() directly. > > The good thing is the explanation for this is a lot more complicated than > the diff itself. ok