From: Ondrej Zajicek (work) Date: Thu, 5 Jul 2018 12:11:46 +0000 (+0200) Subject: BGP: Fix merging of stale paths X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fllgr;p=thirdparty%2Fbird.git BGP: Fix merging of stale paths Paths that are stale due to LLGR should not be merged with non-staled ones. --- diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c index e1517c5a2..3b88791db 100644 --- a/proto/bgp/attrs.c +++ b/proto/bgp/attrs.c @@ -1402,6 +1402,10 @@ bgp_rte_mergable(rte *pri, rte *sec) if (!rte_resolvable(sec)) return 0; + /* LLGR draft - depreference stale routes */ + if (rte_stale(pri) != rte_stale(sec)) + return 0; + /* Start with local preferences */ x = ea_find(pri->attrs->eattrs, EA_CODE(EAP_BGP, BA_LOCAL_PREF)); y = ea_find(sec->attrs->eattrs, EA_CODE(EAP_BGP, BA_LOCAL_PREF));