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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ospf6d/ospf6_route.c b/ospf6d/ospf6_route.c
index 443032933d..cf3f5c909d 100644
--- a/ospf6d/ospf6_route.c
+++ b/ospf6d/ospf6_route.c
@@ -540,6 +540,10 @@ int ospf6_route_cmp(struct ospf6_route *ra, struct ospf6_route *rb)
if (ra->path.area_id != rb->path.area_id)
return (ntohl(ra->path.area_id) - ntohl(rb->path.area_id));
+ if ((ra->prefix_options & OSPF6_PREFIX_OPTION_LA)
+ != (rb->prefix_options & OSPF6_PREFIX_OPTION_LA))
+ return ra->prefix_options & OSPF6_PREFIX_OPTION_LA ? -1 : 1;
+
return 0;
}