]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-udp.c
Add CAP_FCNTL and use cap_fcntls_limit().
[tcpdump] / print-udp.c
index 134a98ccb0e7cddf809ff3ea9ba2b52474939b42..c3edf6ef5de19b855731cd0c30bf07ab6a2d0275 100644 (file)
@@ -444,7 +444,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 +679,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 +694,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));
        }
 }