#include "ospfd/ospf_ase.h"
#include "ospfd/ospf_zebra.h"
#include "ospfd/ospf_dump.h"
+#include "ospfd/ospf_errors.h"
static struct ospf_area_range *ospf_area_range_new(struct prefix_ipv4 *p)
{
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;
}
prefix2str((struct prefix *)p, buf,
sizeof(buf));
- zlog_warn("%s: Could not refresh %s to %s",
+ flog_warn(EC_OSPF_LSA_MISSING,
+ "%s: Could not refresh %s to %s",
__func__, buf,
inet_ntoa(area->area_id));
return;
char buf[PREFIX2STR_BUFFER];
prefix2str((struct prefix *)p, buf, sizeof(buf));
- zlog_warn("%s: Could not originate %s to %s", __func__,
+ flog_warn(EC_OSPF_LSA_MISSING,
+ "%s: Could not originate %s to %s", __func__,
buf, inet_ntoa(area->area_id));
return;
}
char buf[PREFIX2STR_BUFFER];
prefix2str((struct prefix *)p, buf, sizeof(buf));
- zlog_warn("%s: Could not refresh/originate %s to %s",
+ flog_warn(EC_OSPF_LSA_MISSING,
+ "%s: Could not refresh/originate %s to %s",
__func__, buf, inet_ntoa(area->area_id));
return;
}