From: Claudio Jeker Subject: bgpd: fix add-path send best plus 5 To: tech@openbsd.org Date: Tue, 14 Jan 2025 11:08:54 +0100 I broke add-path send when I partially killed the PREFIX_FLAG_STALE flag. add-path uses this flag to temporarily mark the routes in the adj-rib-out as stale and then after updating the routes it walks the list again and withdraws the routes that have the flag still set. Removing the PREFIX_FLAG_STALE clearing in one of the prefix_adjout_update cases broke the method above. While not really needed I readded the same clearing in prefix_adjout_withdraw(). With this 'announce add-path send best plus 5' works again as expected. -- :wq Claudio Index: rde_rib.c =================================================================== RCS file: /cvs/src/usr.sbin/bgpd/rde_rib.c,v diff -u -p -r1.266 rde_rib.c --- rde_rib.c 12 Dec 2024 20:19:03 -0000 1.266 +++ rde_rib.c 13 Jan 2025 19:54:39 -0000 @@ -1273,6 +1273,7 @@ prefix_adjout_update(struct prefix *p, s /* nothing changed */ p->validation_state = state->vstate; p->lastchange = getmonotime(); + p->flags &= ~PREFIX_FLAG_STALE; return; } @@ -1343,6 +1344,7 @@ prefix_adjout_withdraw(struct prefix *p) /* already a withdraw, shortcut */ if (p->flags & PREFIX_FLAG_WITHDRAW) { p->lastchange = getmonotime(); + p->flags &= ~PREFIX_FLAG_STALE; return; } /* pending update just got withdrawn */