]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Nest: Fix route update after preference change 241-bgp-improve-next-hop-prefer-option 248-bgp-reject-as-sets-by-default 270-reject-configuration-with-secondary-and-add-paths-tx-together
authorOndrej Zajicek <santiago@crfreenet.org>
Thu, 29 May 2025 15:34:35 +0000 (17:34 +0200)
committerOndrej Zajicek <santiago@crfreenet.org>
Thu, 29 May 2025 15:34:35 +0000 (17:34 +0200)
The route preference was ignored in route comparison, therefore if
a protocol changed it and then reloaded routes, they were ignored
and routes with the old prefernce were kept.

The bug was introduced 5 years ago, when preference was moved from
struct rte to struct rta.

nest/rt-attr.c

index 7c49af17474607c3d0fa9dd180aa6369b8ca6eaf..e10e1ecbf7f4f9f814be1b965800aedfa53af69b 100644 (file)
@@ -1182,6 +1182,7 @@ rta_same(rta *x, rta *y)
   return (x->source == y->source &&
          x->scope == y->scope &&
          x->dest == y->dest &&
+         x->pref == y->pref &&
          x->igp_metric == y->igp_metric &&
          ipa_equal(x->from, y->from) &&
          x->hostentry == y->hostentry &&