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);
range = ospf_area_range_lookup(area, p);
if (range != NULL) {
+ if (!CHECK_FLAG(advertise, OSPF_AREA_RANGE_ADVERTISE))
+ range->cost_config = OSPF_AREA_RANGE_COST_UNSPEC;
if ((CHECK_FLAG(range->flags, OSPF_AREA_RANGE_ADVERTISE)
&& !CHECK_FLAG(advertise, OSPF_AREA_RANGE_ADVERTISE))
|| (!CHECK_FLAG(range->flags, OSPF_AREA_RANGE_ADVERTISE)
if (CHECK_FLAG(advertise, OSPF_AREA_RANGE_ADVERTISE))
SET_FLAG(range->flags, OSPF_AREA_RANGE_ADVERTISE);
- else
+ else {
UNSET_FLAG(range->flags, OSPF_AREA_RANGE_ADVERTISE);
+ range->cost_config = OSPF_AREA_RANGE_COST_UNSPEC;
+ }
return 1;
}
ospf_area_range_set(ospf, area_id, &p, 0);
ospf_area_display_format_set(ospf, ospf_area_get(ospf, area_id),
format);
+ ospf_area_range_substitute_unset(ospf, area_id, &p);
return CMD_SUCCESS;
}