]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-nfs.c
Update some tests files if the packet time is > 2038-01-19 03:14:07 UTC
[tcpdump] / print-nfs.c
index 9e5102aefc70510d4d81151b3bfc2d96bb7e692b..bbce49536f2acf653179c742e85bccc4d324c534 100644 (file)
@@ -198,7 +198,7 @@ static const struct tok sunrpc_str[] = {
 };
 
 static void
-print_nfsaddr(netdissect_options *ndo,
+nfsaddr_print(netdissect_options *ndo,
               const u_char *bp, const char *s, const char *d)
 {
        const struct ip *ip;
@@ -349,7 +349,7 @@ nfsreply_print(netdissect_options *ndo,
                snprintf(dstid, sizeof(dstid), "%u",
                    GET_BE_U_4(rp->rm_xid));
        }
-       print_nfsaddr(ndo, bp2, srcid, dstid);
+       nfsaddr_print(ndo, bp2, srcid, dstid);
 
        nfsreply_noaddr_print(ndo, bp, length, bp2);
 }
@@ -896,15 +896,17 @@ nfs_printfh(netdissect_options *ndo,
                if (spacep)
                        *spacep = '\0';
 
-               ND_PRINT(" fh %s/", temp);
+               ND_PRINT(" fh ");
+               fn_print_str(ndo, (const u_char *)temp);
+               ND_PRINT("/");
        } else {
                ND_PRINT(" fh %u,%u/",
                             fsid.Fsid_dev.Major, fsid.Fsid_dev.Minor);
        }
 
-       if(fsid.Fsid_dev.Minor == 257)
+       if(fsid.Fsid_dev.Minor == UINT_MAX && fsid.Fsid_dev.Major == UINT_MAX)
                /* Print the undecoded handle */
-               ND_PRINT("%s", fsid.Opaque_Handle);
+               fn_print_str(ndo, (const u_char *)fsid.Opaque_Handle);
        else
                ND_PRINT("%u", ino);
 }
@@ -1558,7 +1560,7 @@ interp_reply(netdissect_options *ndo,
                if (dp == NULL)
                        goto trunc;
                if (v3) {
-                       if (parsewccres(ndo, dp, ndo->ndo_vflag, &nfserr) == 0)
+                       if (parsewccres(ndo, dp, ndo->ndo_vflag, &nfserr) == NULL)
                                goto trunc;
                } else {
                        if (parseattrstat(ndo, dp, !ndo->ndo_qflag, 0, &nfserr) == 0)