From nobody@FreeBSD.org  Sat Jun 16 17:43:52 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 2D7E416A400
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 16 Jun 2007 17:43:52 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id 1DE3113C458
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 16 Jun 2007 17:43:52 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l5GHhpFH026551
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 16 Jun 2007 17:43:51 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l5GHhpA6026550;
	Sat, 16 Jun 2007 17:43:51 GMT
	(envelope-from nobody)
Message-Id: <200706161743.l5GHhpA6026550@www.freebsd.org>
Date: Sat, 16 Jun 2007 17:43:51 GMT
From: Stas Kysel <stas_k_freebsd2@tiger.unisquad.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: bad ip checksum when using re driver
X-Send-Pr-Version: www-3.0

>Number:         113766
>Category:       kern
>Synopsis:       [re] bad ip checksum when using re driver
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    yongari
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 16 17:50:02 GMT 2007
>Closed-Date:    Mon Mar 03 06:46:34 UTC 2008
>Last-Modified:  Mon Mar 03 06:46:34 UTC 2008
>Originator:     Stas Kysel
>Release:        6.2-RELEASE
>Organization:
>Environment:
FreeBSD xxxxx.xxxxx.xxxx.xx 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 11:05:30 UTC 2007     root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP  i386
>Description:

Hi.

The problem is similar to PR 63982 (the same bug in "em" driver).
"re" driver is using and advertizing hardware checksum capability,
but NIC fails to calculate checksums, or at least to calculate them
correctly, for some packets.

Relevant piece of dmesg output:

re0: <RealTek 8168B/8111B PCIe Gigabit Ethernet> port 0xa800-0xa8ff mem 0xff5ff0
00-0xff5fffff irq 17 at device 0.0 on pci2
miibus0: <MII bus> on re0
rgephy0: <RTL8169S/8110S media interface> on miibus0
rgephy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX, 1000baseTX
-FDX, auto
re0: Ethernet address: 00:18:f3:07:9e:e6
re0: [FAST]

Workaround:
ifconfig rl0 -txcsum
>How-To-Repeat:
To reproduce:
1. Use RealTek 8168B/8111B PCIe Gigabit Ethernet card on computer #1,
any card on computer #2 (eg Realtek 8139).
2. Select TCP port on computer #1, eg port 333, and make sure that nothing is
listening on it.
3. run tcpdump on computer #2, eg:
  tcpdump -i rl0 -n -s 1600 -v port 333
4. From computer #2 try to connect to closed port on computer #1, eg using telnet:
  telnet computer1 333
5. In tcpdump output on computer #2 you will see that TCP RST packet has bad
ip checksum.


>Fix:
Workaround:
ifconfig re0 -txcsum



>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->yongari 
Responsible-Changed-By: yongari 
Responsible-Changed-When: Mon Jun 18 02:21:10 UTC 2007 
Responsible-Changed-Why:  
take over 

http://www.freebsd.org/cgi/query-pr.cgi?pr=113766 
State-Changed-From-To: open->feedback 
State-Changed-By: yongari 
State-Changed-When: Mon Jun 18 02:30:19 UTC 2007 
State-Changed-Why:  
I believe the bug was already fixed and MFCed to RELENG_6.(if_re.c, rev. 1.46.2.29) 
Would you try latest stable? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=113766 
State-Changed-From-To: feedback->closed 
State-Changed-By: linimon 
State-Changed-When: Mon Mar 3 06:46:14 UTC 2008 
State-Changed-Why:  
Feedback timeout (> 6 months).  The problem is believed to be fixed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=113766 
>Unformatted:
