Bug 3371

Summary: LBL tcpdump 3.3 -merge submission
Product: Base System Reporter: skynyrd <skynyrd>
Component: binAssignee: Bill Fenner <fenner>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 3.0-CURRENT   
Hardware: Any   
OS: Any   

Description skynyrd 1997-04-22 01:40:00 UTC
Pre lbl-3.3 tcpdump (like the one in -current) mistakenly believes
that the small udp packet is actually a truncated one because of a
logic bug in print-udp.c (which probably produced correct results for
the wrong reasons on interfaces which padded ethernet packets to
ETHERMIN before the bpf_tap.)  Of course nowadays we have more
advanced hw that pads for us so the driver doesn't have to, and very
short packets get shoved down the bpf_tap pipe to bring these bugs to
light. But anyways:

Fix: 

tcpdump v3.3 from ftp.ee.lbl.gov fixes the problem.

Since we are a release behind, I have done nearly all of the work necessary 
to merge this into -current and created a kit which I have uploaded as

ftp://ftp.freebsd.org/pub/FreeBSD/incoming/tcpdump-to-lbl33-merge.tar.gz

MD5 (tcpdump-to-lbl33-merge.tar.gz) = 7fa45cf54d5ce868d21bfeaecde55b3e

The kit consists of a buildable reference tree that resulted from my local 
CVS merge (into a copy of the FreeBSD tree) of lbl-3.3 tcpdump, and a patch
kit to address merge conflicts (a couple of -Wall patches are included
separately.)

A complete narrative of length war and peace is included which explains
how this would be useful to someone really merging this into our tree.
Normally the corresponding release of libpcap would be merged at the
same time - I can do that, too, but would like some feedback on whether
or not this kind of submission is useful or appropriate.
How-To-Repeat: 
To see the bug, use netcat to query a udp time server, such as the one
that inetd can run, and monitor the transaction from the same machine
using tcpdump:

   nc -u -z -w 1 pahtoh time

   15:54:37.024031 [|udp]
   15:54:37.025030 pahtoh.cwu.edu.time > swash.cts.cwu.edu.1267: udp 4

Merged -current+lbl-3.3 correctly processes this:

   15:57:39.021435 swash.cts.cwu.edu.1271 > pahtoh.cwu.edu.time: udp 1
   15:57:39.022410 pahtoh.cwu.edu.time > swash.cts.cwu.edu.1271: udp 4
Comment 1 fenner 1997-04-22 02:27:16 UTC
I'll volunteer to merge tcpdump 3.3 and libpcap 0.3, unless Paul
has more time than I think he has and wants to do it.

  Bill
Comment 2 Paul Traina 1997-04-22 05:48:58 UTC
Nope, please do.

  From: Bill Fenner <fenner@parc.xerox.com>
  Subject: Re:  bin/3371: LBL tcpdump 3.3 -merge submission
  I'll volunteer to merge tcpdump 3.3 and libpcap 0.3, unless Paul
  has more time than I think he has and wants to do it.
  
    Bill
Comment 3 Bill Fenner freebsd_committer freebsd_triage 1997-04-22 17:47:30 UTC
Responsible Changed
From-To: freebsd-bugs->fenner

fenner will merge tcpdump 3.3 and libpcap 0.3 
Comment 4 Bill Fenner freebsd_committer freebsd_triage 1997-05-27 03:22:06 UTC
State Changed
From-To: open->closed

tcpdump 3.3 imported.  Sorry it took so long.