]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-udp.c
Add support for the Marvell Extended Distributed Switch Architecture header
[tcpdump] / print-udp.c
index 134a98ccb0e7cddf809ff3ea9ba2b52474939b42..17816121a6c987261ab137db90e8689440729238 100644 (file)
@@ -19,7 +19,6 @@
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
-#define NETDISSECT_REWORKED
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -444,7 +443,7 @@ udp_print(netdissect_options *ndo, register const u_char *bp, u_int length,
 
                case PT_CNFP:
                        udpipaddr_print(ndo, ip, sport, dport);
-                       cnfp_print(ndo, cp, (const u_char *)ip);
+                       cnfp_print(ndo, cp);
                        break;
 
                case PT_TFTP:
@@ -679,13 +678,14 @@ udp_print(netdissect_options *ndo, register const u_char *bp, u_int length,
                        otv_print(ndo, (const u_char *)(up + 1), length);
                 else if (ISPORT(VXLAN_PORT))
                        vxlan_print(ndo, (const u_char *)(up + 1), length);
+                else if (ISPORT(GENEVE_PORT))
+                       geneve_print(ndo, (const u_char *)(up + 1), length);
                else {
                        if (ulen > length)
                                ND_PRINT((ndo, "UDP, bad length %u > %u",
                                    ulen, length));
                        else
-                               ND_PRINT((ndo, "UDP, length %u",
-                                   (uint32_t)(ulen - sizeof(*up))));
+                               ND_PRINT((ndo, "UDP, length %u", ulen));
                }
 #undef ISPORT
        } else {
@@ -693,8 +693,7 @@ udp_print(netdissect_options *ndo, register const u_char *bp, u_int length,
                        ND_PRINT((ndo, "UDP, bad length %u > %u",
                            ulen, length));
                else
-                       ND_PRINT((ndo, "UDP, length %u",
-                           (uint32_t)(ulen - sizeof(*up))));
+                       ND_PRINT((ndo, "UDP, length %u", ulen));
        }
 }