mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 22:30:43 +00:00
ospfd: Convert ospf_routemap.c to use error card subsystem
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
abcc171c93
commit
45301f8cb2
@ -23,6 +23,18 @@
|
|||||||
#include "lib/ferr.h"
|
#include "lib/ferr.h"
|
||||||
#include "ospf_errors.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[] = {
|
static struct log_ref ferr_ospf_err[] = {
|
||||||
{
|
{
|
||||||
.code = OSPF_ERR_PKT_PROCESS,
|
.code = OSPF_ERR_PKT_PROCESS,
|
||||||
@ -72,7 +84,6 @@ static struct log_ref ferr_ospf_err[] = {
|
|||||||
.description = "OSPF Segment Routing invalid Algorithm",
|
.description = "OSPF Segment Routing invalid Algorithm",
|
||||||
.suggestion = "Most likely a bug. If the problem persists, report the problem for troubleshooting"
|
.suggestion = "Most likely a bug. If the problem persists, report the problem for troubleshooting"
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
.code = END_FERR,
|
.code = END_FERR,
|
||||||
}
|
}
|
||||||
@ -80,5 +91,6 @@ static struct log_ref ferr_ospf_err[] = {
|
|||||||
|
|
||||||
void ospf_error_init(void)
|
void ospf_error_init(void)
|
||||||
{
|
{
|
||||||
|
log_ref_add(ferr_ospf_warn);
|
||||||
log_ref_add(ferr_ospf_err);
|
log_ref_add(ferr_ospf_err);
|
||||||
}
|
}
|
||||||
|
@ -32,6 +32,7 @@ enum ospf_log_refs {
|
|||||||
OSPF_ERR_SR_NODE_CREATE,
|
OSPF_ERR_SR_NODE_CREATE,
|
||||||
OSPF_ERR_SR_INVALID_LSA_ID,
|
OSPF_ERR_SR_INVALID_LSA_ID,
|
||||||
OSPF_ERR_SR_INVALID_ALGORITHM,
|
OSPF_ERR_SR_INVALID_ALGORITHM,
|
||||||
|
OSPF_WARN_SET_METRIC_PLUS,
|
||||||
};
|
};
|
||||||
|
|
||||||
extern void ospf_error_init(void);
|
extern void ospf_error_init(void);
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
#include "ospfd/ospf_lsa.h"
|
#include "ospfd/ospf_lsa.h"
|
||||||
#include "ospfd/ospf_route.h"
|
#include "ospfd/ospf_route.h"
|
||||||
#include "ospfd/ospf_zebra.h"
|
#include "ospfd/ospf_zebra.h"
|
||||||
|
#include "ospfd/ospf_errors.h"
|
||||||
|
|
||||||
/* Hook function for updating route_map assignment. */
|
/* Hook function for updating route_map assignment. */
|
||||||
static void ospf_route_map_update(const char *name)
|
static void ospf_route_map_update(const char *name)
|
||||||
@ -392,7 +393,8 @@ static void *route_set_metric_compile(const char *arg)
|
|||||||
metric->type = metric_absolute;
|
metric->type = metric_absolute;
|
||||||
|
|
||||||
if (strmatch(arg, "+rtt") || strmatch(arg, "-rtt")) {
|
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;
|
return metric;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user