Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ospf6d: resolve problem with area range lsid creation #38

Merged
merged 1 commit into from
Jan 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions ospf6d/ospf6_abr.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,12 +424,9 @@ ospf6_abr_originate_summary_to_area (struct ospf6_route *route,
else
{
summary->path.origin.type = htons (OSPF6_LSTYPE_INTER_PREFIX);
if (route->type == OSPF6_DEST_TYPE_RANGE)
summary->path.origin.id = route->linkstate_id;
else
summary->path.origin.id =
ospf6_new_ls_id (summary->path.origin.type,
summary->path.origin.adv_router, area->lsdb);
summary->path.origin.id =
ospf6_new_ls_id (summary->path.origin.type,
summary->path.origin.adv_router, area->lsdb);
}
summary = ospf6_route_add (summary, summary_table);
}
Expand Down
4 changes: 0 additions & 4 deletions ospf6d/ospf6_area.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,6 @@ DEFUN (area_range,
range->prefix = prefix;
range->path.area_id = oa->area_id;
range->path.cost = OSPF_AREA_RANGE_COST_UNSPEC;
range->linkstate_id =
(u_int32_t) htonl(ospf6_new_range_ls_id (oa->range_table));
}

if (argc > 2)
Expand Down Expand Up @@ -577,8 +575,6 @@ DEFUN (no_area_range,
/* purge the old aggregated summary LSA */
ospf6_abr_originate_summary(range);
}
ospf6_release_range_ls_id(oa->range_table,
(u_int32_t) ntohl(range->linkstate_id));
ospf6_route_remove (range, oa->range_table);

return CMD_SUCCESS;
Expand Down
18 changes: 0 additions & 18 deletions ospf6d/ospf6_lsdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,24 +547,6 @@ ospf6_lsdb_show (struct vty *vty, enum ospf_lsdb_show_level level,
}
}

/* Decide new Link State ID to originate for the range. */
u_int32_t
ospf6_new_range_ls_id (struct ospf6_route_table *range_table)
{
u_int32_t id;

bf_assign_index(range_table->idspace, id);
return (id);
}

/* Release the LS ID back to the ID pool */
void
ospf6_release_range_ls_id (struct ospf6_route_table *range_table,
u_int32_t id)
{
bf_release_index(range_table->idspace, id);
}

u_int32_t
ospf6_new_ls_id (u_int16_t type, u_int32_t adv_router,
struct ospf6_lsdb *lsdb)
Expand Down
3 changes: 0 additions & 3 deletions ospf6d/ospf6_lsdb.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ extern void ospf6_lsdb_show (struct vty *vty,

extern u_int32_t ospf6_new_ls_id (u_int16_t type, u_int32_t adv_router,
struct ospf6_lsdb *lsdb);
extern u_int32_t ospf6_new_range_ls_id (struct ospf6_route_table *range_table);
extern void ospf6_release_range_ls_id (struct ospf6_route_table *range_table,
u_int32_t id);
extern u_int32_t ospf6_new_ls_seqnum (u_int16_t type, u_int32_t id,
u_int32_t adv_router,
struct ospf6_lsdb *lsdb);
Expand Down