]> The Tcpdump Group git mirrors - tcpdump/commitdiff
DCCP: Fix a truncation message
authorFrancois-Xavier Le Bail <[email protected]>
Tue, 29 May 2018 16:26:14 +0000 (18:26 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Tue, 29 May 2018 16:26:14 +0000 (18:26 +0200)
It's a truncated packet, not sure it's invalid.

print-dccp.c

index 407ec2dd773064c5089797bb3b4bf996d511b190..af47d60ede8755221e090469691da871f6c500a7 100644 (file)
@@ -294,10 +294,8 @@ dccp_print(netdissect_options *ndo, const u_char *bp, const u_char *data2,
 
        /* make sure we have enough data to look at the X bit */
        cp = (const u_char *)(dh + 1);
-       if (cp > ndo->ndo_snapend) {
-               ND_PRINT("[Invalid packet|dccp]");
-               return;
-       }
+       if (cp > ndo->ndo_snapend)
+               goto trunc;
        if (len < sizeof(struct dccp_hdr)) {
                ND_PRINT("truncated-dccp - %u bytes missing!",
                          len - (u_int)sizeof(struct dccp_hdr));