Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/tcpdump Fix PR 7196: bad udp checksum reported when...



details:   https://anonhg.NetBSD.org/src/rev/4b169f8a7cd5
branches:  trunk
changeset: 472447:4b169f8a7cd5
user:      sommerfe <sommerfe%NetBSD.org@localhost>
date:      Thu Apr 29 21:20:13 1999 +0000

description:
Fix PR 7196: bad udp checksum reported when capture barely too short

diffstat:

 usr.sbin/tcpdump/print-udp.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r ffbde28abbe7 -r 4b169f8a7cd5 usr.sbin/tcpdump/print-udp.c
--- a/usr.sbin/tcpdump/print-udp.c      Thu Apr 29 20:21:34 1999 +0000
+++ b/usr.sbin/tcpdump/print-udp.c      Thu Apr 29 21:20:13 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: print-udp.c,v 1.7 1998/12/18 20:28:54 sommerfe Exp $   */
+/*     $NetBSD: print-udp.c,v 1.8 1999/04/29 21:20:13 sommerfe Exp $   */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@@ -27,7 +27,7 @@
 static const char rcsid[] =
     "@(#) Header: print-udp.c,v 1.60 97/07/27 21:58:48 leres Exp  (LBL)";
 #else
-__RCSID("$NetBSD: print-udp.c,v 1.7 1998/12/18 20:28:54 sommerfe Exp $");
+__RCSID("$NetBSD: print-udp.c,v 1.8 1999/04/29 21:20:13 sommerfe Exp $");
 #endif
 #endif
 
@@ -470,7 +470,7 @@
                int sum = up->uh_sum;
                if (sum == 0) {
                        (void)printf(" [no cksum]");
-               } else if (TTEST2(up->uh_sport, length)) {
+               } else if (TTEST2(cp[0], length)) {
                        sum = udp_cksum(ip, up, length);
                        if (sum != 0)
                                (void)printf(" [bad udp cksum %x!]", sum);



Home | Main Index | Thread Index | Old Index