Fixes routing loops when backup routes with recursive nexthops of other
protocols come and go.
Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
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);
if ((!r1 && r2) || (r1 && !r2))
return 1;
+ if (r1->distance != r2->distance)
+ return 1;
+
if (r1->metric != r2->metric)
return 1;