BGP: Fixed LLGR depreferencing in bgp_rte_mergable
This commit is contained in:
parent
4a23ede2b0
commit
dabd7bccb3
1 changed files with 5 additions and 2 deletions
|
@ -2074,14 +2074,17 @@ bgp_rte_mergable(rte *pri, rte *sec)
|
|||
u32 p, s;
|
||||
|
||||
/* Skip suppressed routes (see bgp_rte_recalculate()) */
|
||||
/* LLGR draft - depreference stale routes */
|
||||
if (pri->pflags != sec->pflags)
|
||||
if ((pri->pflags ^ sec->pflags) & BGP_REF_SUPPRESSED)
|
||||
return 0;
|
||||
|
||||
/* RFC 4271 9.1.2.1. Route resolvability test */
|
||||
if (rte_resolvable(pri) != 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(PROTOCOL_BGP, BA_LOCAL_PREF));
|
||||
y = ea_find(sec->attrs->eattrs, EA_CODE(PROTOCOL_BGP, BA_LOCAL_PREF));
|
||||
|
|
Loading…
Reference in a new issue