From 0df9e138c07bd5963b6c740a1c19f9c2881745c5 Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Thu, 5 Jul 2018 14:11:46 +0200 Subject: [PATCH] BGP: Fix merging of stale paths Paths that are stale due to LLGR should not be merged with non-staled ones. --- proto/bgp/attrs.c | 4 ++++ 1 file changed, 4 insertions(+) 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)); -- 2.47.2