summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_route.c
diff options
context:
space:
mode:
Diffstat (limited to 'ospf6d/ospf6_route.c')
-rw-r--r--ospf6d/ospf6_route.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ospf6d/ospf6_route.c b/ospf6d/ospf6_route.c
index 4d436792dc..67b9b9df96 100644
--- a/ospf6d/ospf6_route.c
+++ b/ospf6d/ospf6_route.c
@@ -460,9 +460,6 @@ int ospf6_route_cmp(struct ospf6_route *ra, struct ospf6_route *rb)
if (ra->type != rb->type)
return (ra->type - rb->type);
- if (ra->path.area_id != rb->path.area_id)
- return (ntohl(ra->path.area_id) - ntohl(rb->path.area_id));
-
if (ra->path.type != rb->path.type)
return (ra->path.type - rb->path.type);
@@ -476,6 +473,9 @@ int ospf6_route_cmp(struct ospf6_route *ra, struct ospf6_route *rb)
return (ra->path.cost - rb->path.cost);
}
+ if (ra->path.area_id != rb->path.area_id)
+ return (ntohl(ra->path.area_id) - ntohl(rb->path.area_id));
+
return 0;
}