]> The Tcpdump Group git mirrors - tcpdump/commitdiff
do not use ip_p for getting protocol # in tcp_cksum. we may have AH/ESP.
authoritojun <itojun>
Tue, 1 Aug 2000 17:35:05 +0000 (17:35 +0000)
committeritojun <itojun>
Tue, 1 Aug 2000 17:35:05 +0000 (17:35 +0000)
print-tcp.c

index 1f09536d7a53adde2a90452b18cb4441155e8489..0f684272f8acc676e62261ac4562d3d593830e97 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-tcp.c,v 1.71 2000-08-01 17:28:09 itojun Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-tcp.c,v 1.72 2000-08-01 17:35:05 itojun Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -156,7 +156,7 @@ static int tcp_cksum(register const struct ip *ip,
        /* pseudo-header.. */
        phu.ph.len = htons(tlen);
        phu.ph.mbz = 0;
        /* pseudo-header.. */
        phu.ph.len = htons(tlen);
        phu.ph.mbz = 0;
-       phu.ph.proto = ip->ip_p;
+       phu.ph.proto = IPPROTO_TCP;
        memcpy(&phu.ph.src, &ip->ip_src.s_addr, sizeof(u_int32_t));
        memcpy(&phu.ph.dst, &ip->ip_dst.s_addr, sizeof(u_int32_t));
 
        memcpy(&phu.ph.src, &ip->ip_src.s_addr, sizeof(u_int32_t));
        memcpy(&phu.ph.dst, &ip->ip_dst.s_addr, sizeof(u_int32_t));