.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 = BGP_WARN_UPDATE_PACKET_SHORT,
+ .title = "BGP Update Packet is to Small",
+ .description = "The update packet received from a peer is to small",
+ .suggestion = "Determine the source of the update packet and examine that peer for what has gone wrong",
+ },
+ {
+ .code = BGP_WARN_UPDATE_PACKET_LONG,
+ .title = "BGP Update Packet is to large",
+ .description = "The update packet received from a peer is to large",
+ .suggestion = "Determine the source of the update packet and examine that peer for what has gone wrong",
+ },
+ {
+ .code = BGP_WARN_UNRECOGNIZED_CAPABILITY,
+ .title = "Unknown BGP Capability Received",
+ .description = "The negotiation of capabilities has received a capability that we do not know what to do with",
+ .suggestion = "Determine the source of the capability and remove the capability from what is sent",
+ },
{
.code = END_FERR,
}
{
log_ref_add(ferr_bgp_warn);
log_ref_add(ferr_bgp_err);
+ log_ref_add(ferr_bgp_warn);
}
BGP_WARN_ATTRIBUTE_FETCH_ERROR,
BGP_WARN_ATTRIBUTES_MISMATCH,
BGP_WARN_DUMP,
+ BGP_WARN_UPDATE_PACKET_SHORT,
+ BGP_WARN_UPDATE_PACKET_LONG,
+ BGP_WARN_UNRECOGNIZED_CAPABILITY,
};
extern void bgp_error_init(void);
/* Attribute total length check. */
if (stream_pnt(s) + 2 > end) {
- zlog_warn(
- "%s [Error] Packet Error"
- " (update packet is short for attribute length)",
- peer->host);
+ flog_warn(BGP_WARN_UPDATE_PACKET_SHORT,
+ "%s [Error] Packet Error (update packet is short for attribute length)",
+ peer->host);
bgp_notify_send(peer, BGP_NOTIFY_UPDATE_ERR,
BGP_NOTIFY_UPDATE_MAL_ATTR);
return BGP_Stop;
/* Attribute length check. */
if (stream_pnt(s) + attribute_len > end) {
- zlog_warn(
- "%s [Error] Packet Error"
- " (update packet attribute length overflow %d)",
- peer->host, attribute_len);
+ flog_warn(BGP_WARN_UPDATE_PACKET_LONG,
+ "%s [Error] Packet Error (update packet attribute length overflow %d)",
+ peer->host, attribute_len);
bgp_notify_send(peer, BGP_NOTIFY_UPDATE_ERR,
BGP_NOTIFY_UPDATE_MAL_ATTR);
return BGP_Stop;
return BGP_Stop;
}
} else {
- zlog_warn(
- "%s unrecognized capability code: %d - ignored",
- peer->host, hdr->code);
+ flog_warn(BGP_WARN_UNRECOGNIZED_CAPABILITY,
+ "%s unrecognized capability code: %d - ignored",
+ peer->host, hdr->code);
}
}