From nobody  Tue Mar  3 06:59:48 1998
Received: (from nobody@localhost)
          by hub.freebsd.org (8.8.8/8.8.8) id GAA21128;
          Tue, 3 Mar 1998 06:59:48 -0800 (PST)
          (envelope-from nobody)
Message-Id: <199803031459.GAA21128@hub.freebsd.org>
Date: Tue, 3 Mar 1998 06:59:48 -0800 (PST)
From: gotoh@ae.anritsu.co.jp
To: freebsd-gnats-submit@freebsd.org
Subject: Ethernet Frame size is mismatch (if_lnc.c)
X-Send-Pr-Version: www-1.0

>Number:         5910
>Category:       i386
>Synopsis:       Ethernet Frame size is mismatch (if_lnc.c)
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    steve
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar  3 07:00:02 PST 1998
>Closed-Date:    Sun Mar 15 17:34:25 PST 1998
>Last-Modified:  Sun Mar 15 17:34:56 PST 1998
>Originator:     Yoshikazu Goto
>Release:        FreeBSD 2.2.5-RELEASE
>Organization:
Anritsu Engineering Co.,Ltd
>Environment:
FreeBSD melchior.magi.or.jp 2.2.5-RELEASE FreeBSD 2.2.5-RELEASE #0: 
Sun Mar  1 01:30:59 JST 1998
goto@melchior.magi.or.jp:/usr/src/sys/compile/MELCHIOR  i386                                                                               

>Description:
My system is used a NE2100(C-LANCE) NIC. This NIC is sent some Ethernet
frame, but frame size is wrong. When I run the "ping" command,

    % ping -c 1 -s 18 192.168.1.1

output packet size is 68bytes. Perhaps,...

    Ethernet header + IP header + ICMP header +
	ICMP data + (4) + FCS = 68byte


>How-To-Repeat:
If you send a packet that size is larger than 64bytes and smaller then
68bytes, Output packet size is 68byte.
>Fix:
In "/usr/src/sys/i386/isa/if_lnc.c", In function "lnc_start()",

    desc->md->md2 = -max(len, ETHER_MIN_LEN);

this line is mismatch. I think, correct routine is next line.

    desc->md->md2 = -max(len, ETHER_MIN_LEN - ETHER_CRC_LEN);

>Release-Note:
>Audit-Trail:

From: kchowksey@hss.hns.com
To: freebsd-gnats-submit@freebsd.org, gotoh@ae.anritsu.co.jp
Cc: kchowksey@hss.hns.com
Subject: Re:i386/5910:EthernetFramesizeismismatch(if_lnc.c)
Date: Wed, 4 Mar 1998 10:17:50 GMT

 This also fixes kern/4989. I have tested this fix with 3.0-CURRENT
 of 28 Feb. Recommend this be committed.
 

From: Kapil Chowksey <kchowksey@hss.hns.com>
To: freebsd-gnats-submit@freebsd.org, gotoh@ae.anritsu.co.jp
Cc: rhh@ct.picker.com
Subject: Re: i386/5910: Ethernet Frame size is mismatch (if_lnc.c)
Date: Wed, 04 Mar 1998 10:34:35 +0530

 This also fixes kern/4989. I have tested this on 3.0-CURRENT (ca. 28
 Feb). Recommend this be committed.
State-Changed-From-To: open->feedback 
State-Changed-By: steve 
State-Changed-When: Sun Mar 8 19:07:10 PST 1998 
State-Changed-Why:  
Patch applied to -current.  I am leaving this open pending 
approval to commit to -stable. 
State-Changed-From-To: feedback->closed 
State-Changed-By: steve 
State-Changed-When: Sun Mar 15 17:34:25 PST 1998 
State-Changed-Why:  
Merged into -stable too. 
>Unformatted:
