]> The Tcpdump Group git mirrors - tcpdump/commitdiff
BGP: Align printing for error 7 with RFC 7313 / IANA Error codes registry
authorJob Snijders <[email protected]>
Sat, 17 Feb 2024 10:47:36 +0000 (10:47 +0000)
committerfxlb <[email protected]>
Tue, 20 Feb 2024 12:29:49 +0000 (12:29 +0000)
https://www.rfc-editor.org/rfc/rfc7313.html
https://www.iana.org/assignments/bgp-parameters/bgp-parameters.xhtml#bgp-parameters-3

print-bgp.c

index 81a95b859669fb0c2abaa0df28f21d8a19875f72..55857c694bf6ce980e57038ec8c981959221f57d 100644 (file)
@@ -288,7 +288,7 @@ static const struct tok bgp_capcode_values[] = {
 #define BGP_NOTIFY_MAJOR_HOLDTIME       4
 #define BGP_NOTIFY_MAJOR_FSM            5
 #define BGP_NOTIFY_MAJOR_CEASE          6
-#define BGP_NOTIFY_MAJOR_CAP            7
+#define BGP_NOTIFY_MAJOR_ROUTEREFRESH   7
 
 static const struct tok bgp_notify_major_values[] = {
     { BGP_NOTIFY_MAJOR_MSG,     "Message Header Error"},
@@ -297,7 +297,7 @@ static const struct tok bgp_notify_major_values[] = {
     { BGP_NOTIFY_MAJOR_HOLDTIME,"Hold Timer Expired"},
     { BGP_NOTIFY_MAJOR_FSM,     "Finite State Machine Error"},
     { BGP_NOTIFY_MAJOR_CEASE,   "Cease"},
-    { BGP_NOTIFY_MAJOR_CAP,     "Capability Message Error"},
+    { BGP_NOTIFY_MAJOR_ROUTEREFRESH, "ROUTE-REFRESH Message Error"},
     { 0, NULL}
 };
 
@@ -363,11 +363,8 @@ static const struct tok bgp_notify_minor_fsm_values[] = {
     { 0, NULL }
 };
 
-static const struct tok bgp_notify_minor_cap_values[] = {
-    { 1,                        "Invalid Action Value" },
-    { 2,                        "Invalid Capability Length" },
-    { 3,                        "Malformed Capability Value" },
-    { 4,                        "Unsupported Capability Code" },
+static const struct tok bgp_notify_minor_routerefresh_values[] = {
+    { 1,                        "Invalid Message Length" },
     { 0, NULL }
 };
 
@@ -3177,9 +3174,9 @@ bgp_notification_print_code(netdissect_options *ndo,
                           bgpn_minor),
                   bgpn_minor);
         break;
-    case BGP_NOTIFY_MAJOR_CAP:
+    case BGP_NOTIFY_MAJOR_ROUTEREFRESH:
         ND_PRINT(" subcode %s (%u)",
-                  tok2str(bgp_notify_minor_cap_values, "Unknown",
+                  tok2str(bgp_notify_minor_routerefresh_values, "Unknown",
                           bgpn_minor),
                   bgpn_minor);
         break;