]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
BGP: Update SendHoldTimer BGP Error code
authorJob Snijders <job@fastly.com>
Sun, 18 Feb 2024 08:00:10 +0000 (09:00 +0100)
committerOndrej Zajicek <santiago@crfreenet.org>
Sun, 18 Feb 2024 08:06:52 +0000 (09:06 +0100)
IANA registered an "Early Allocation" BGP Error code for 'Send Hold
Timer Expired' event. Update BIRD to use that error code.

proto/bgp/bgp.c
proto/bgp/packets.c

index e97b45e6fea3b6f2c23a15d360630ec24eca4f40..bd6e90d6e454f203b289abb2306cfbb52bb2e604 100644 (file)
@@ -1059,12 +1059,13 @@ bgp_send_hold_timeout(timer *t)
   struct bgp_conn *conn = t->data;
   struct bgp_proto *p = conn->bgp;
 
+  DBG("BGP: Send hold timeout\n");
+
   if (conn->state == BS_CLOSE)
     return;
 
-  /* Error codes not yet assigned by IANA */
-  uint code = 4;
-  uint subcode = 1;
+  uint code = 8;
+  uint subcode = 0;
 
   /* Like bgp_error() but without NOTIFICATION */
   bgp_log_error(p, BE_BGP_TX, "Error", code, subcode, NULL, 0);
index 18a226fbaa5781cf1202368185e564d2664d6d8f..f1e03621ebadaafd4e307ff4518d65ccddd9eb4d 100644 (file)
@@ -3275,7 +3275,6 @@ static struct {
   { 3, 10, "Invalid network field" },
   { 3, 11, "Malformed AS_PATH" },
   { 4, 0, "Hold timer expired" },
-  { 4, 1, "Send hold timer expired" }, /* Provisional [draft-ietf-idr-bgp-sendholdtimer] */
   { 5, 0, "Finite state machine error" }, /* Subcodes are according to [RFC6608] */
   { 5, 1, "Unexpected message in OpenSent state" },
   { 5, 2, "Unexpected message in OpenConfirm state" },
@@ -3290,7 +3289,8 @@ static struct {
   { 6, 7, "Connection collision resolution" },
   { 6, 8, "Out of Resources" },
   { 7, 0, "Invalid ROUTE-REFRESH message" }, /* [RFC7313] */
-  { 7, 1, "Invalid ROUTE-REFRESH message length" } /* [RFC7313] */
+  { 7, 1, "Invalid ROUTE-REFRESH message length" }, /* [RFC7313] */
+  { 8, 0, "Send hold timer expired" }, /* [draft-ietf-idr-bgp-sendholdtimer] */
 };
 
 /**