]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-nfs.c
bgp: Parse BGP extended message support capability
[tcpdump] / print-nfs.c
index a7218f25d071d95813b0560a23085aeb69685829..20b0cfcef4d8260537b2a3aa690c7cd88b9dab87 100644 (file)
@@ -291,7 +291,6 @@ parse_sattr3(netdissect_options *ndo,
        sa3->sa_atimetype = GET_BE_U_4(dp);
        dp++;
        if (sa3->sa_atimetype == NFSV3SATTRTIME_TOCLIENT) {
-               ND_TCHECK_4(dp + 1);
                sa3->sa_atime.nfsv3_sec = GET_BE_U_4(dp);
                dp++;
                sa3->sa_atime.nfsv3_nsec = GET_BE_U_4(dp);
@@ -301,7 +300,6 @@ parse_sattr3(netdissect_options *ndo,
        sa3->sa_mtimetype = GET_BE_U_4(dp);
        dp++;
        if (sa3->sa_mtimetype == NFSV3SATTRTIME_TOCLIENT) {
-               ND_TCHECK_4(dp + 1);
                sa3->sa_mtime.nfsv3_sec = GET_BE_U_4(dp);
                dp++;
                sa3->sa_mtime.nfsv3_nsec = GET_BE_U_4(dp);
@@ -309,8 +307,6 @@ parse_sattr3(netdissect_options *ndo,
        }
 
        return dp;
-trunc:
-       return NULL;
 }
 
 static void
@@ -344,7 +340,6 @@ nfsreply_print(netdissect_options *ndo,
        ndo->ndo_protocol = "nfs";
        rp = (const struct sunrpc_msg *)bp;
 
-       ND_TCHECK_4(rp->rm_xid);
        if (!ndo->ndo_nflag) {
                strlcpy(srcid, "nfs", sizeof(srcid));
                snprintf(dstid, sizeof(dstid), "%u",
@@ -357,10 +352,6 @@ nfsreply_print(netdissect_options *ndo,
        print_nfsaddr(ndo, bp2, srcid, dstid);
 
        nfsreply_noaddr_print(ndo, bp, length, bp2);
-       return;
-
-trunc:
-       nd_print_trunc(ndo);
 }
 
 void
@@ -1321,15 +1312,12 @@ parserddires(netdissect_options *ndo,
        if (ndo->ndo_qflag)
                return (1);
 
-       ND_TCHECK_4(dp + 2);
        ND_PRINT(" offset 0x%x size %u ",
               GET_BE_U_4(dp), GET_BE_U_4(dp + 1));
        if (GET_BE_U_4(dp + 2) != 0)
                ND_PRINT(" eof");
 
        return (1);
-trunc:
-       return (0);
 }
 
 static const uint32_t *