]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
BGP: Fix merging of stale paths llgr
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Thu, 5 Jul 2018 12:11:46 +0000 (14:11 +0200)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Thu, 5 Jul 2018 12:11:46 +0000 (14:11 +0200)
Paths that are stale due to LLGR should not be merged with non-staled ones.

proto/bgp/attrs.c

index e1517c5a2e03320bc5615beac1d36cccc1ddeae2..3b88791db3e612ea6313755200a1940675a357ae 100644 (file)
@@ -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));