]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-tcp.c
refine the previous change
[tcpdump] / print-tcp.c
index eee98fe925ac6c71a7aad7ff280a6e21e3e165f8..e5acfa4c0694c977df85c84308a0a72ab98a4b3a 100644 (file)
@@ -386,7 +386,8 @@ tcp_print(register const u_char *bp, register u_int length,
 #ifdef INET6
                 else if (IP_V(ip) == 6 && ip6->ip6_plen) {
                         if (TTEST2(tp->th_sport, length)) {
 #ifdef INET6
                 else if (IP_V(ip) == 6 && ip6->ip6_plen) {
                         if (TTEST2(tp->th_sport, length)) {
-                                sum = nextproto6_cksum(ip6, (const u_int8_t *)tp, length, IPPROTO_TCP);
+                                sum = nextproto6_cksum(ip6, (const u_int8_t *)tp,
+                                                       length, length, IPPROTO_TCP);
                                 tcp_sum = EXTRACT_16BITS(&tp->th_sum);
 
                                 (void)printf(", cksum 0x%04x", tcp_sum);
                                 tcp_sum = EXTRACT_16BITS(&tp->th_sum);
 
                                 (void)printf(", cksum 0x%04x", tcp_sum);