diff options
author | Maria Matejka <mq@ucw.cz> | 2022-05-30 15:32:11 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-05-30 15:32:11 +0200 |
commit | 81aeccbb00bdc457c53bb8ab96715537513f7b2c (patch) | |
tree | bf35a54afc7d7df4b5a7fa0be022d4c540fd6c6e /proto/bgp/attrs.c | |
parent | d7b077f5d63625beaca1bcfe971e3b853dbfcc06 (diff) | |
parent | d39ef961d1dde230c55fcc931b53f44cb34a1e63 (diff) |
Merge commit 'd39ef961d1dde230c55fcc931b53f44cb34a1e63' into haugesund
Diffstat (limited to 'proto/bgp/attrs.c')
-rw-r--r-- | proto/bgp/attrs.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c index f4f7d15a..9f31c28b 100644 --- a/proto/bgp/attrs.c +++ b/proto/bgp/attrs.c @@ -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 (rta_resolvable(pri->attrs) != rta_resolvable(sec->attrs)) 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)); |