diff options
Diffstat (limited to 'ospf6d/ospf6_route.c')
| -rw-r--r-- | ospf6d/ospf6_route.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ospf6d/ospf6_route.c b/ospf6d/ospf6_route.c index 87f3f6edca..67b9b9df96 100644 --- a/ospf6d/ospf6_route.c +++ b/ospf6d/ospf6_route.c @@ -122,7 +122,7 @@ static char *ospf6_route_table_name(struct ospf6_route_table *table) return name; } -void ospf6_linkstate_prefix(u_int32_t adv_router, u_int32_t id, +void ospf6_linkstate_prefix(uint32_t adv_router, uint32_t id, struct prefix *prefix) { memset(prefix, 0, sizeof(struct prefix)); @@ -134,7 +134,7 @@ void ospf6_linkstate_prefix(u_int32_t adv_router, u_int32_t id, void ospf6_linkstate_prefix2str(struct prefix *prefix, char *buf, int size) { - u_int32_t adv_router, id; + uint32_t adv_router, id; char adv_router_str[16], id_str[16]; memcpy(&adv_router, &prefix->u.prefix6.s6_addr[0], 4); memcpy(&id, &prefix->u.prefix6.s6_addr[4], 4); @@ -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; } @@ -1245,7 +1245,7 @@ static void ospf6_route_show_table_match(struct vty *vty, int detail, } static void ospf6_route_show_table_type(struct vty *vty, int detail, - u_char type, + uint8_t type, struct ospf6_route_table *table) { struct ospf6_route *route; @@ -1288,7 +1288,7 @@ int ospf6_route_table_show(struct vty *vty, int argc_start, int argc, int isprefix = 0; int i, ret; struct prefix prefix; - u_char type = 0; + uint8_t type = 0; memset(&prefix, 0, sizeof(struct prefix)); @@ -1375,7 +1375,7 @@ static void ospf6_linkstate_show_header(struct vty *vty) static void ospf6_linkstate_show(struct vty *vty, struct ospf6_route *route) { - u_int32_t router, id; + uint32_t router, id; char routername[16], idname[16], rbits[16], options[16]; router = ospf6_linkstate_prefix_adv_router(&route->prefix); @@ -1501,7 +1501,7 @@ void ospf6_brouter_show_header(struct vty *vty) void ospf6_brouter_show(struct vty *vty, struct ospf6_route *route) { - u_int32_t adv_router; + uint32_t adv_router; char adv[16], rbits[16], options[16], area[16]; adv_router = ospf6_linkstate_prefix_adv_router(&route->prefix); |
