summaryrefslogtreecommitdiff
path: root/zebra/zebra_rnh.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_rnh.c')
-rw-r--r--zebra/zebra_rnh.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c
index 8a326c27fc..8ab46f683c 100644
--- a/zebra/zebra_rnh.c
+++ b/zebra/zebra_rnh.c
@@ -815,6 +815,7 @@ static void copy_state(struct rnh *rnh, struct route_entry *re,
state = XCALLOC(MTYPE_RE, sizeof(struct route_entry));
state->type = re->type;
+ state->distance = re->distance;
state->metric = re->metric;
route_entry_copy_nexthops(state, re->nexthop);
@@ -830,6 +831,9 @@ static int compare_state(struct route_entry *r1, struct route_entry *r2)
if ((!r1 && r2) || (r1 && !r2))
return 1;
+ if (r1->distance != r2->distance)
+ return 1;
+
if (r1->metric != r2->metric)
return 1;