]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-bfd.c
CHANGES: Add a change backported to 4.99
[tcpdump] / print-bfd.c
index e28046e7d0e1d0a98e921d93acfb3bb95d6ffc94..74ad2f7fa31f6e98882390451a5e5e9540668b68 100644 (file)
@@ -20,9 +20,7 @@
  * RFC 5880 for version 1, and RFC 5881
  */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include "netdissect-stdinc.h"
 
@@ -146,7 +144,8 @@ static const struct tok bfd_diag_values[] = {
 static const struct tok bfd_port_values[] = {
     { BFD_CONTROL_PORT,  "Control" },
     { BFD_MULTIHOP_PORT, "Multihop" },
-    { BFD_LAG_PORT,      "Lag" },
+    { BFD_LAG_PORT,      "LAG" },
+    { SBFD_PORT,         "S-BFD" },
     { 0, NULL }
 };
 
@@ -294,7 +293,8 @@ bfd_print(netdissect_options *ndo, const u_char *pptr,
        ndo->ndo_protocol = "bfd";
         if (port == BFD_CONTROL_PORT ||
             port == BFD_MULTIHOP_PORT ||
-            port == BFD_LAG_PORT) {
+            port == BFD_LAG_PORT ||
+            port == SBFD_PORT) {
             /*
              * Control packet.
              */
@@ -313,8 +313,7 @@ bfd_print(netdissect_options *ndo, const u_char *pptr,
 
                 /* BFDv0 */
             case 0:
-                if (ndo->ndo_vflag < 1)
-                {
+                if (ndo->ndo_vflag < 1) {
                     ND_PRINT("BFDv0, Control, Flags: [%s], length: %u",
                            bittok2str(bfd_v0_flag_values, "none", flags),
                            len);
@@ -351,8 +350,7 @@ bfd_print(netdissect_options *ndo, const u_char *pptr,
 
                 /* BFDv1 */
             case 1:
-                if (ndo->ndo_vflag < 1)
-                {
+                if (ndo->ndo_vflag < 1) {
                     ND_PRINT("BFDv1, %s, State %s, Flags: [%s], length: %u",
                            tok2str(bfd_port_values, "unknown (%u)", port),
                            tok2str(bfd_v1_state_values, "unknown (%u)", (flags & 0xc0) >> 6),