]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-krb.c
CI: Add warning exemptions for Sun C (suncc-5.14) on Solaris 10
[tcpdump] / print-krb.c
index c6c2fe7dc69f357bcf0851877a11e13099f6b0af..69a0c1155e21819f9af17171e7998755068c19f3 100644 (file)
@@ -23,9 +23,7 @@
 
 /* \summary: Kerberos printer */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include "netdissect-stdinc.h"
 
@@ -200,7 +198,6 @@ krb4_print(netdissect_options *ndo,
                if ((cp = krb4_print_hdr(ndo, cp)) == NULL)
                        return;
                cp += 10;       /* timestamp + n + exp + kvno */
-               ND_TCHECK_LEN(cp, sizeof(short));
                len = KTOHSP(kp, cp);
                ND_PRINT(" (%u)", len);
                break;
@@ -208,8 +205,7 @@ krb4_print(netdissect_options *ndo,
        case AUTH_MSG_ERR_REPLY:
                if ((cp = krb4_print_hdr(ndo, cp)) == NULL)
                        return;
-               cp += 4;          /* timestamp */
-               ND_TCHECK_LEN(cp, sizeof(short));
+               cp += 4;          /* timestamp */
                ND_PRINT(" %s ", tok2str(kerr2str, NULL, KTOHSP(kp, cp)));
                cp += 4;
                PRINT;
@@ -231,13 +227,10 @@ krb_print(netdissect_options *ndo,
 {
        const struct krb *kp;
 
-       ndo->ndo_protocol = "krb";
-       kp = (const struct krb *)dat;
+       ndo->ndo_protocol = "kerberos";
+       nd_print_protocol(ndo);
 
-       if (dat >= ndo->ndo_snapend) {
-               nd_print_trunc(ndo);
-               return;
-       }
+       kp = (const struct krb *)dat;
 
        switch (GET_U_1(kp->pvno)) {
 
@@ -258,5 +251,4 @@ krb_print(netdissect_options *ndo,
                /* Decode ASN.1 here "someday" */
                break;
        }
-       return;
 }