From: Ondrej Zajicek Date: Sat, 10 Dec 2022 17:03:41 +0000 (+0100) Subject: BGP: Log unacceptable hold time as decimal number X-Git-Tag: v2.0.11~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=937ebf2536e6b4d65f996af53a29ac550ac0cc2a;p=thirdparty%2Fbird.git BGP: Log unacceptable hold time as decimal number Thanks Johannes Moos for the suggestion. --- diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c index afcacffaf..7ce2fd636 100644 --- a/proto/bgp/packets.c +++ b/proto/bgp/packets.c @@ -3152,8 +3152,8 @@ bgp_log_error(struct bgp_proto *p, u8 class, char *msg, uint code, uint subcode, if (len) { - /* Bad peer AS - we would like to print the AS */ - if ((code == 2) && (subcode == 2) && ((len == 2) || (len == 4))) + /* Bad peer AS / unacceptable hold time - print the value as decimal number */ + if ((code == 2) && ((subcode == 2) || (subcode == 6)) && ((len == 2) || (len == 4))) { t += bsprintf(t, ": %u", (len == 2) ? get_u16(data) : get_u32(data)); goto done;