From f7eb6f1611eb0a17ddb804c38acaab7e031c8126 Mon Sep 17 00:00:00 2001
From: Ondrej Zajicek <santiago@crfreenet.org>
Date: Thu, 29 May 2025 17:34:35 +0200
Subject: Nest: Fix route update after preference change

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.

diff --git a/nest/rt-attr.c b/nest/rt-attr.c
index 7c49af174..e10e1ecbf 100644
--- a/nest/rt-attr.c
+++ b/nest/rt-attr.c
@@ -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 &&
