]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-sunrpc.c
Update .gitignore for other configurations
[tcpdump] / print-sunrpc.c
index 9c62728fc1b3f950e29211e74ba95ef828b0a5ba..f83f4eb92d31935272ace99ec0fb699a37676401 100644 (file)
@@ -167,7 +167,9 @@ sunrpc_print(netdissect_options *ndo, const u_char *bp,
        uint32_t x;
        char srcid[20], dstid[20];      /*fits 32bit*/
 
+       ndo->ndo_protocol = "sunrpc";
        rp = (const struct sunrpc_msg *)bp;
+       ND_TCHECK_SIZE(rp);
 
        if (!ndo->ndo_nflag) {
                nd_snprintf(srcid, sizeof(srcid), "0x%x",
@@ -217,6 +219,10 @@ sunrpc_print(netdissect_options *ndo, const u_char *bp,
                ND_PRINT(".%u", EXTRACT_BE_U_4(rp->rm_call.cb_vers));
                break;
        }
+       return;
+
+trunc:
+       nd_print_trunc(ndo);
 }
 
 static char *