case OSPF6_LSTYPE_ROUTER:
case OSPF6_LSTYPE_NETWORK:
if (IS_OSPF6_DEBUG_EXAMIN_TYPE(lsa->header->type)) {
- zlog_debug("Examin %s", lsa->name);
- zlog_debug("Schedule SPF Calculation for %s",
+ zlog_debug("%s Examin LSA %s", __PRETTY_FUNCTION__,
+ lsa->name);
+ zlog_debug(" Schedule SPF Calculation for %s",
OSPF6_AREA(lsa->lsdb->data)->name);
}
ospf6_spf_schedule(
static void ospf6_area_route_hook_add(struct ospf6_route *route)
{
- struct ospf6_route *copy = ospf6_route_copy(route);
+ struct ospf6_route *copy;
+
+ copy = ospf6_route_copy(route);
ospf6_route_add(copy, ospf6->route_table);
}
* @param o - ospf6 instance
* @param df - display format for area ID
*/
-struct ospf6_area *ospf6_area_create(u_int32_t area_id, struct ospf6 *o, int df)
+struct ospf6_area *ospf6_area_create(uint32_t area_id, struct ospf6 *o, int df)
{
struct ospf6_area *oa;
oa->lsdb->hook_add = ospf6_area_lsdb_hook_add;
oa->lsdb->hook_remove = ospf6_area_lsdb_hook_remove;
oa->lsdb_self = ospf6_lsdb_create(oa);
+ oa->temp_router_lsa_lsdb = ospf6_lsdb_create(oa);
oa->spf_table = OSPF6_ROUTE_TABLE_CREATE(AREA, SPF_RESULTS);
oa->spf_table->scope = oa;
oa->summary_prefix->scope = oa;
oa->summary_router = OSPF6_ROUTE_TABLE_CREATE(AREA, SUMMARY_ROUTERS);
oa->summary_router->scope = oa;
+ oa->router_lsa_size_limit = 1024 + 256;
/* set default options */
if (CHECK_FLAG(o->flag, OSPF6_STUB_ROUTER)) {
for (ALL_LIST_ELEMENTS_RO(oa->if_list, n, oi))
oi->area = NULL;
- list_delete_and_null(&oa->if_list);
+ list_delete(&oa->if_list);
ospf6_lsdb_delete(oa->lsdb);
ospf6_lsdb_delete(oa->lsdb_self);
+ ospf6_lsdb_delete(oa->temp_router_lsa_lsdb);
ospf6_spf_table_finish(oa->spf_table);
ospf6_route_table_delete(oa->spf_table);
XFREE(MTYPE_OSPF6_AREA, oa);
}
-struct ospf6_area *ospf6_area_lookup(u_int32_t area_id, struct ospf6 *ospf6)
+struct ospf6_area *ospf6_area_lookup(uint32_t area_id, struct ospf6 *ospf6)
{
struct ospf6_area *oa;
struct listnode *n;
#define OSPF6_CMD_AREA_GET(str, oa) \
{ \
char *ep; \
- u_int32_t area_id = htonl(strtoul(str, &ep, 10)); \
+ uint32_t area_id = htonl(strtoul(str, &ep, 10)); \
if (*ep && inet_pton(AF_INET, str, &area_id) != 1) { \
vty_out(vty, "Malformed Area-ID: %s\n", str); \
return CMD_SUCCESS; \
struct ospf6_area *oa;
struct prefix prefix;
struct ospf6_route *range;
- u_int32_t cost = OSPF_AREA_RANGE_COST_UNSPEC;
+ uint32_t cost = OSPF_AREA_RANGE_COST_UNSPEC;
OSPF6_CMD_AREA_GET(argv[idx_ipv4]->arg, oa);
SET_FLAG(range->flag, OSPF6_ROUTE_DO_NOT_ADVERTISE);
} else if (strmatch(argv[idx_type]->text, "advertise")) {
UNSET_FLAG(range->flag, OSPF6_ROUTE_DO_NOT_ADVERTISE);
+ cost = range->path.u.cost_config;
} else {
cost = strtoul(argv[5]->arg, NULL, 10);
UNSET_FLAG(range->flag, OSPF6_ROUTE_DO_NOT_ADVERTISE);
DEFUN (area_filter_list,
area_filter_list_cmd,
- "area A.B.C.D filter-list prefix WORD <in|out>",
+ "area <A.B.C.D|(0-4294967295)> filter-list prefix WORD <in|out>",
"OSPF6 area parameters\n"
"OSPF6 area ID in IP address format\n"
+ "OSPF6 area ID as a decimal value\n"
"Filter networks between OSPF6 areas\n"
"Filter prefixes between OSPF6 areas\n"
"Name of an IPv6 prefix-list\n"
if (strmatch(inout, "in")) {
PREFIX_LIST_IN(area) = plist;
XFREE(MTYPE_OSPF6_PLISTNAME, PREFIX_NAME_IN(area));
- PREFIX_NAME_IN(area) = XSTRDUP(MTYPE_OSPF6_PLISTNAME,
- plistname);
+ PREFIX_NAME_IN(area) =
+ XSTRDUP(MTYPE_OSPF6_PLISTNAME, plistname);
ospf6_abr_reimport(area);
} else {
PREFIX_LIST_OUT(area) = plist;
XFREE(MTYPE_OSPF6_PLISTNAME, PREFIX_NAME_OUT(area));
- PREFIX_NAME_OUT(area) = XSTRDUP(MTYPE_OSPF6_PLISTNAME,
- plistname);
+ PREFIX_NAME_OUT(area) =
+ XSTRDUP(MTYPE_OSPF6_PLISTNAME, plistname);
ospf6_abr_enable_area(area);
}
DEFUN (no_area_filter_list,
no_area_filter_list_cmd,
- "no area A.B.C.D filter-list prefix WORD <in|out>",
+ "no area <A.B.C.D|(0-4294967295)> filter-list prefix WORD <in|out>",
NO_STR
"OSPF6 area parameters\n"
"OSPF6 area ID in IP address format\n"
+ "OSPF6 area ID as a decimal value\n"
"Filter networks between OSPF6 areas\n"
"Filter prefixes between OSPF6 areas\n"
"Name of an IPv6 prefix-list\n"
DEFUN (area_import_list,
area_import_list_cmd,
- "area A.B.C.D import-list NAME",
+ "area <A.B.C.D|(0-4294967295)> import-list NAME",
"OSPF6 area parameters\n"
"OSPF6 area ID in IP address format\n"
+ "OSPF6 area ID as a decimal value\n"
"Set the filter for networks from other areas announced to the specified one\n"
"Name of the acess-list\n")
{
DEFUN (no_area_import_list,
no_area_import_list_cmd,
- "no area A.B.C.D import-list NAME",
+ "no area <A.B.C.D|(0-4294967295)> import-list NAME",
NO_STR
"OSPF6 area parameters\n"
"OSPF6 area ID in IP address format\n"
+ "OSPF6 area ID as a decimal value\n"
"Unset the filter for networks announced to other areas\n"
"Name of the access-list\n")
{
DEFUN (area_export_list,
area_export_list_cmd,
- "area A.B.C.D export-list NAME",
+ "area <A.B.C.D|(0-4294967295)> export-list NAME",
"OSPF6 area parameters\n"
"OSPF6 area ID in IP address format\n"
+ "OSPF6 area ID as a decimal value\n"
"Set the filter for networks announced to other areas\n"
"Name of the acess-list\n")
{
DEFUN (no_area_export_list,
no_area_export_list_cmd,
- "no area A.B.C.D export-list NAME",
+ "no area <A.B.C.D|(0-4294967295)> export-list NAME",
NO_STR
"OSPF6 area parameters\n"
"OSPF6 area ID in IP address format\n"
+ "OSPF6 area ID as a decimal value\n"
"Unset the filter for networks announced to other areas\n"
"Name of the access-list\n")
{
SHOW_STR
IP6_STR
OSPF6_STR
- "Shortest Path First caculation\n"
+ "Shortest Path First calculation\n"
"Show SPF tree\n")
{
struct listnode *node;
OSPF6_STR
OSPF6_AREA_STR
OSPF6_AREA_ID_STR
- "Shortest Path First caculation\n"
+ "Shortest Path First calculation\n"
"Show SPF tree\n")
{
int idx_ipv4 = 4;
- u_int32_t area_id;
+ uint32_t area_id;
struct ospf6_area *oa;
struct ospf6_vertex *root;
struct ospf6_route *route;
{
int idx_ipv4 = 5;
int idx_ipv4_2 = 7;
- u_int32_t area_id;
+ uint32_t area_id;
struct ospf6_area *oa;
struct ospf6_vertex *root;
struct ospf6_route *route;
struct prefix prefix;
- u_int32_t router_id;
+ uint32_t router_id;
struct ospf6_route_table *spf_table;
unsigned char tmp_debug_ospf6_spf = 0;