]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ip.c
Fix the pointer tests in the non-ndoified TTEST2() macro as well.
[tcpdump] / print-ip.c
index 3d08f553f1329c0998f1804c5ee4c7d7397d733d..acf3bd8be9fe0de2a466231ed54087ac960c7e92 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.158 2007-03-27 10:44:09 hannes Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-ip.c,v 1.159 2007-09-14 01:29:28 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -50,6 +50,7 @@ struct tok ip_option_values[] = {
     { IPOPT_SSRR, "SSRR" },
     { IPOPT_LSRR, "LSRR" },
     { IPOPT_RA, "RA" },
+    { IPOPT_RFC1393, "traceroute" },
     { 0, NULL }
 };
 
@@ -507,7 +508,8 @@ again:
                break;
 
        case IPPROTO_PIM:
-               pim_print(ipds->cp,  ipds->len);
+               pim_print(ipds->cp,  ipds->len,
+                         in_cksum((const u_short*)ipds->cp, ipds->len, 0));
                break;
 
        case IPPROTO_VRRP:
@@ -656,7 +658,7 @@ ip_print(netdissect_options *ndo,
                 printf(")");
             }
 
-           if ((u_char *)ipds->ip + hlen <= snapend) {
+           if (!Kflag && (u_char *)ipds->ip + hlen <= snapend) {
                sum = in_cksum((const u_short *)ipds->ip, hlen, 0);
                if (sum != 0) {
                    ip_sum = EXTRACT_16BITS(&ipds->ip->ip_sum);