]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
BGP: Log unacceptable hold time as decimal number
authorOndrej Zajicek <santiago@crfreenet.org>
Sat, 10 Dec 2022 17:03:41 +0000 (18:03 +0100)
committerOndrej Zajicek <santiago@crfreenet.org>
Sat, 10 Dec 2022 17:06:52 +0000 (18:06 +0100)
Thanks Johannes Moos for the suggestion.

proto/bgp/packets.c

index afcacffaffda4f0769f8a3421eb6ec1a5171e0a7..7ce2fd636db564f48fc869de905a4ed29aee9815 100644 (file)
@@ -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;