summaryrefslogtreecommitdiff
path: root/proto/bgp/packets.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2022-12-10 18:03:41 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2022-12-10 18:06:52 +0100
commit937ebf2536e6b4d65f996af53a29ac550ac0cc2a (patch)
treee831dc61bdf01701cc42b120c2c8916a5ee20240 /proto/bgp/packets.c
parent4c19a8a984c39c7269cf497808735f147243800b (diff)
BGP: Log unacceptable hold time as decimal number
Thanks Johannes Moos for the suggestion.
Diffstat (limited to 'proto/bgp/packets.c')
-rw-r--r--proto/bgp/packets.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/proto/bgp/packets.c b/proto/bgp/packets.c
index afcacffa..7ce2fd63 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;