0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-09-19 20:05:21 +00:00

BGP: Fix merging of stale paths

Paths that are stale due to LLGR should not be merged with non-staled ones.
This commit is contained in:
Ondrej Zajicek (work) 2018-07-05 14:11:46 +02:00
parent e31e368147
commit 0df9e138c0

View File

@ -1402,6 +1402,10 @@ bgp_rte_mergable(rte *pri, rte *sec)
if (!rte_resolvable(sec)) if (!rte_resolvable(sec))
return 0; return 0;
/* LLGR draft - depreference stale routes */
if (rte_stale(pri) != rte_stale(sec))
return 0;
/* Start with local preferences */ /* Start with local preferences */
x = ea_find(pri->attrs->eattrs, EA_CODE(EAP_BGP, BA_LOCAL_PREF)); 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)); y = ea_find(sec->attrs->eattrs, EA_CODE(EAP_BGP, BA_LOCAL_PREF));