#include "lib/ferr.h"
#include "ospf_errors.h"
+static struct log_ref ferr_ospf_warn[] = {
+ {
+ .code = OSPF_WARN_SET_METRIC_PLUS,
+ .title = "OSPF does not support `set metric +rtt/-rtt`",
+ .description = "This implementation of OSPF does not currently support `set metric +rtt/-rtt`",
+ .suggestion = "Do not use this particular set command for an ospf route-map",
+ },
+ {
+ .code = END_FERR,
+ }
+};
+
static struct log_ref ferr_ospf_err[] = {
{
.code = OSPF_ERR_PKT_PROCESS,
.description = "OSPF Segment Routing invalid Algorithm",
.suggestion = "Most likely a bug. If the problem persists, report the problem for troubleshooting"
},
-
{
.code = END_FERR,
}
void ospf_error_init(void)
{
+ log_ref_add(ferr_ospf_warn);
log_ref_add(ferr_ospf_err);
}
OSPF_ERR_SR_NODE_CREATE,
OSPF_ERR_SR_INVALID_LSA_ID,
OSPF_ERR_SR_INVALID_ALGORITHM,
+ OSPF_WARN_SET_METRIC_PLUS,
};
extern void ospf_error_init(void);
#include "ospfd/ospf_lsa.h"
#include "ospfd/ospf_route.h"
#include "ospfd/ospf_zebra.h"
+#include "ospfd/ospf_errors.h"
/* Hook function for updating route_map assignment. */
static void ospf_route_map_update(const char *name)
metric->type = metric_absolute;
if (strmatch(arg, "+rtt") || strmatch(arg, "-rtt")) {
- zlog_warn("OSPF does not support 'set metric +rtt / -rtt'");
+ flog_warn(OSPF_WARN_SET_METRIC_PLUS,
+ "OSPF does not support 'set metric +rtt / -rtt'");
return metric;
}