CVSROOT: /cvs Module name: src Changes by: t...@cvs.openbsd.org 2022/08/01 05:02:16
Modified files: usr.sbin/bgpd : Tag: OPENBSD_7_1 rde.c rde.h rde_decide.c rde_rib.c Log message: Properly handle nexthop state changes in the decision process In rev 1.90 of rde_decide.c the re->active cache of the best prefix was replaced with a call to prefix_best(). This introduced a bug because the nexthop state at that time may have changed already. As a result when a nexthop became unreachable prefix_evaluate() had oldbest = NULL and newbest = NULL and did not withdraw the prefix from FIB and Adj-RIB-Out. To fix this store the nexthop state per prefix and introduce prefix_evaluate_nexthop() which removes the prefix from the decision list, updates the nexthop state of the prefix and reinserts the prefix. Doing this ensures that prefix_best() always reports the same result once the decison process is done. prefix_best() and prefix_eligible() only depend on data stored on the prefix itself. from claudio, backport tb this is patches/7.1/common/008_bgpd.patch.sig