#include "bgpd/bgp_route.h"
#include "bgpd/bgp_attr.h"
#include "bgpd/bgp_dump.h"
+#include "bgpd/bgp_errors.h"
enum bgp_dump_type {
BGP_DUMP_ALL,
ret = strftime(realpath, MAXPATHLEN, bgp_dump->filename, tm);
if (ret == 0) {
- zlog_warn("bgp_dump_open_file: strftime error");
+ flog_warn(BGP_WARN_DUMP, "bgp_dump_open_file: strftime error");
return NULL;
}
bgp_dump->fp = fopen(realpath, "w");
if (bgp_dump->fp == NULL) {
- zlog_warn("bgp_dump_open_file: %s: %s", realpath,
+ flog_warn(BGP_WARN_DUMP, "bgp_dump_open_file: %s: %s", realpath,
strerror(errno));
umask(oldumask);
return NULL;
.description = "BGP has received a update packet with attributes that when parsed do not correctly add up to packet data length",
.suggestion = "Gather log data from this and remote peer and open an Issue with this data",
},
+ {
+ .code = BGP_WARN_DUMP,
+ .title = "BGP MRT dump subsystem has encountered an issue",
+ .description = "BGP has found that the attempted write of MRT data to a dump file has failed",
+ .suggestion = "Ensure BGP has permissions to write the specified file",
+ },
{
.code = END_FERR,
}
BGP_WARN_ATTRIBUTE_PARSE_WITHDRAW,
BGP_WARN_ATTRIBUTE_FETCH_ERROR,
BGP_WARN_ATTRIBUTES_MISMATCH,
+ BGP_WARN_DUMP,
};
extern void bgp_error_init(void);