From nobody@FreeBSD.org  Thu Sep  5 19:32:11 2002
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id AF45137B400
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  5 Sep 2002 19:32:11 -0700 (PDT)
Received: from www.freebsd.org (www.FreeBSD.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 722DB43E65
	for <freebsd-gnats-submit@FreeBSD.org>; Thu,  5 Sep 2002 19:32:11 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.4/8.12.4) with ESMTP id g862WAOT093854
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 5 Sep 2002 19:32:10 -0700 (PDT)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.4/8.12.4/Submit) id g862WAvE093853;
	Thu, 5 Sep 2002 19:32:10 -0700 (PDT)
Message-Id: <200209060232.g862WAvE093853@www.freebsd.org>
Date: Thu, 5 Sep 2002 19:32:10 -0700 (PDT)
From: Wada Keiji <keiji@hiemalis.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: bridge and ipfw problem
X-Send-Pr-Version: www-1.0

>Number:         42465
>Category:       kern
>Synopsis:       bridge and ipfw problem
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    cjc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 05 19:40:01 PDT 2002
>Closed-Date:    Thu Dec 05 21:14:55 PST 2002
>Last-Modified:  Thu Dec 05 21:14:55 PST 2002
>Originator:     Wada Keiji
>Release:        FreeBSD 4.7-PRERELEASE
>Organization:
>Environment:
FreeBSD spinach.net2.jp 4.7-PRERELEASE FreeBSD 4.7-PRERELEASE #2: Wed Sep  4 01:57:27 JST 2002     keiji@spinach.net2.jp:/usr/src/sys/compile/SPINACH  i386
1
>Description:
      	I use the FreeBSD bridge box with ipfw. But after Jul 9 , I have a
	problem. At Jul 9, Mr.luigi changed some codes for bridge and ipfw.

	The problem is that FreeBSD bridge box doesn't reply for arp who-has
	packet to the machine that is known by the bridge box.

	Below is the test condition.
	The bridge box knows the poker,is NetBSD machine, MAC.
	The poker doesn't know bridge box MAC.

	-----
	% sysctl -w net.link.ether.bridge=1
	net.link.ether.bridge: 0 -> 1
	% sysctl -w net.link.ether.bridge_ipfw=1
	net.link.ether.bridge_ipfw: 0 -> 1
	% sysctl -w net.link.ether.bridge_cfg=rl0,ed1
	net.link.ether.bridge_cfg:  -> rl0,ed1
	% ipfw flush
	Are you sure? [yn] y
	
	Flushed all rules.
	% tcpdump host poker
	tcpdump: listening on rl0
	16:35:26.720001 arp who-has spinach.net2.jp tell poker
	16:35:27.725862 arp who-has spinach.net2.jp tell poker
	16:35:28.735955 arp who-has spinach.net2.jp tell poker
	-----

	I tested, the kernel of Jul 8 is OK, but the kernel of Jul 10 is NG.
	Please fix this problem.

>How-To-Repeat:
      
>Fix:
      
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->luigi 
Responsible-Changed-By: luigi 
Responsible-Changed-When: Sun Sep 22 11:27:33 PDT 2002 
Responsible-Changed-Why:  
my code (though i have no idea what is wrong here -- can you supply 
more details please ?) 


http://www.freebsd.org/cgi/query-pr.cgi?pr=42465 

From: "Crist J. Clark" <crist.clark@attbi.com>
To: Wada Keiji <keiji@hiemalis.org>
Cc: freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: kern/42465: bridge and ipfw problem
Date: Tue, 8 Oct 2002 21:56:45 -0700

 As I reported in,
 
   http://docs.freebsd.org/cgi/getmsg.cgi?fetch=80380+0+archive/2002/freebsd-ipfw/20021006.freebsd-ipfw
 
 I have been able to reliably reproduce the bug in this PR. I've also
 seen a little more of what is going on and made a fix. I don't know if
 this is indicative of a deeper problem, and if this is just an ugly
 bandaid.
 
 Here's the patch,
 
 Index: if_ethersubr.c
 ===================================================================
 RCS file: /export/freebsd/ncvs/src/sys/net/if_ethersubr.c,v
 retrieving revision 1.70.2.30
 diff -u -r1.70.2.30 if_ethersubr.c
 --- if_ethersubr.c	30 Aug 2002 14:23:38 -0000	1.70.2.30
 +++ if_ethersubr.c	8 Oct 2002 23:54:31 -0000
 @@ -611,8 +611,7 @@
  				printf("bdg_forward drop MULTICAST PKT\n");
  			    return;
  			}
 -			if (m != oldm) /* m changed! */
 -			    eh = &save_eh ;
 +			eh = &save_eh ;
  		}
  		if (bif == BDG_LOCAL
  		    || bif == BDG_BCAST
 
 Why does this work? I was tracking the changes to the value of m0 in
 the function bgd_forward. When ipfw(8) is enabled in the bridge, there
 was a tendency for m0 to change to a different value and then go
 _back_ to the original value. So even though the value in eh was
 getting munged, the check above was giving a false-negative. Just
 restore the Ethernet header unconditionally.
 
 I'm not sure why the value of m0 switches back and forth or whether
 that eh is getting changed is a bug.
 -- 
 Crist J. Clark                     |     cjclark@alum.mit.edu
                                    |     cjclark@jhu.edu
 http://people.freebsd.org/~cjc/    |     cjc@freebsd.org

From: Ruben van Staveren <ruben@verweg.com>
To: freebsd-gnats-submit@FreeBSD.org, keiji@hiemalis.org
Cc:  
Subject: Re: kern/42465: bridge and ipfw problem
Date: Sun, 20 Oct 2002 15:57:06 +0200

 Could it be related to:
 
 http://groups.google.com/groups?selm=20020507103838.GA337_hubble.home.ben.com%40ns.sol.net&output=gplain
 
 (not using a kernel with options BRIDGE, and only kldloading it)
 
 ?
 
 I had a case that bridging my wifi segment with my LAN segment did not work
 until I build a kernel with options BRIDGE. I had only kldload'ed bridge
 before.
 
 Cheers,
 	Ruben
 
 -- 
    ,-_  .----------------------------------------------------------------.
   /() ) |       Ruben van Staveren      http://ruben.is.verweg.com/      |_o
  (__ (  |Men are from Mars. Women are from Venus. Computers are from hell| #>
 =/  ()  `----------------------------------------------------------------' 4

From: "Niels Piersma" <niels@piersma.com>
To: <freebsd-gnats-submit@freebsd.org>, <keiji@hiemalis.org>
Cc:  
Subject: Re: kern/42465: bridge and ipfw problem
Date: Sat, 23 Nov 2002 08:41:17 +0100

 This is a multi-part message in MIME format.
 
 ------=_NextPart_000_000A_01C292CC.172C2D30
 Content-Type: text/plain;
 	charset="US-ASCII"
 Content-Transfer-Encoding: 7bit
 
 I have the same problem. My bridge also is used a virus scanning mail
 gateway and it becomes sometimes unavailable. I used the following dirty
 fix!
 
  
 
 Place in rc.local or anywhere else where you start your boot files;
 
 ping [ip addr of router/switch]
 
  
 
 !Tada! a constant ping 
 
  
 
 With this running I have no problems anymore. It's ugly, but for now it
 fixes the problem. (ARP cache keeps up to date and no ARP-resolving has
 to be done) We have bandwidth to spare so that isn't any problem here.
 
  
 
 Niels Piersma
 
  
 
 Lijsterhof 12
 
 2371 PC Roelofarendsveen
 
 Phone:  +31 (0) 71 331 9239
 
 Fax:      +31 (0) 71 331 9247
 
 Mobile:  +31 (0) 61 424 8182
 
  
 
 
 ------=_NextPart_000_000A_01C292CC.172C2D30
 Content-Type: text/html;
 	charset="US-ASCII"
 Content-Transfer-Encoding: quoted-printable
 
 <html>
 
 <head>
 <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
 charset=3Dus-ascii">
 
 
 <meta name=3DGenerator content=3D"Microsoft Word 10 (filtered)">
 
 <style>
 <!--
  /* Style Definitions */
  p.MsoNormal, li.MsoNormal, div.MsoNormal
 	{margin:0cm;
 	margin-bottom:.0001pt;
 	font-size:12.0pt;
 	font-family:"Times New Roman";}
 a:link, span.MsoHyperlink
 	{color:blue;
 	text-decoration:underline;}
 a:visited, span.MsoHyperlinkFollowed
 	{color:purple;
 	text-decoration:underline;}
 span.EmailStyle17
 	{font-family:Arial;
 	color:windowtext;}
 @page Section1
 	{size:612.0pt 792.0pt;
 	margin:72.0pt 90.0pt 72.0pt 90.0pt;}
 div.Section1
 	{page:Section1;}
 -->
 </style>
 
 </head>
 
 <body lang=3DEN-US link=3Dblue vlink=3Dpurple>
 
 <div class=3DSection1>
 
 <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
 style=3D'font-size:10.0pt;
 font-family:Arial'>I have the same problem. My bridge also is used a =
 virus
 scanning mail gateway and it becomes sometimes unavailable. I used the
 following dirty fix!</span></font></p>
 
 <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
 style=3D'font-size:10.0pt;
 font-family:Arial'>&nbsp;</span></font></p>
 
 <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
 style=3D'font-size:10.0pt;
 font-family:Arial'>Place in rc.local or anywhere else where you start =
 your boot
 files;</span></font></p>
 
 <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
 style=3D'font-size:10.0pt;
 font-family:Arial'>ping [ip addr of router/switch]</span></font></p>
 
 <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
 style=3D'font-size:10.0pt;
 font-family:Arial'>&nbsp;</span></font></p>
 
 <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
 style=3D'font-size:10.0pt;
 font-family:Arial'>!Tada! a constant ping </span></font></p>
 
 <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
 style=3D'font-size:10.0pt;
 font-family:Arial'>&nbsp;</span></font></p>
 
 <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
 style=3D'font-size:10.0pt;
 font-family:Arial'>With this running I have no problems anymore. =
 It&#8217;s
 ugly, but for now it fixes the problem. (ARP cache keeps up to date and =
 no ARP-resolving
 has to be done) We have bandwidth to spare so that isn&#8217;t any =
 problem
 here.</span></font></p>
 
 <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
 style=3D'font-size:10.0pt;
 font-family:Arial'>&nbsp;</span></font></p>
 
 <p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DNL =
 style=3D'font-size:10.0pt;
 font-family:Arial'>Niels Piersma</span></font></p>
 
 <div style=3D'border:none;border-bottom:solid windowtext =
 1.0pt;padding:0cm 0cm 1.0pt 0cm'>
 
 <div style=3D'border:none;border-bottom:solid windowtext =
 1.0pt;padding:0cm 0cm 1.0pt 0cm'>
 
 <p class=3DMsoNormal style=3D'border:none;padding:0cm'><font size=3D2 =
 face=3DArial><span
 lang=3DNL =
 style=3D'font-size:10.0pt;font-family:Arial'>&nbsp;</span></font></p>
 
 </div>
 
 </div>
 
 <p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DNL =
 style=3D'font-size:10.0pt;
 font-family:Arial'>Lijsterhof 12</span></font></p>
 
 <p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DNL =
 style=3D'font-size:10.0pt;
 font-family:Arial'>2371 PC Roelofarendsveen</span></font></p>
 
 <p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DNL =
 style=3D'font-size:10.0pt;
 font-family:Arial'>Phone:&nbsp; +31 (0) 71 331 9239</span></font></p>
 
 <p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DNL =
 style=3D'font-size:10.0pt;
 font-family:Arial'>Fax:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +31 (0) 71 331 =
 9247</span></font></p>
 
 <p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DNL =
 style=3D'font-size:10.0pt;
 font-family:Arial'>Mobile:&nbsp; +31 (0) 61 424 8182</span></font></p>
 
 <p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
 style=3D'font-size:
 12.0pt'>&nbsp;</span></font></p>
 
 </div>
 
 </body>
 
 </html>
 
 ------=_NextPart_000_000A_01C292CC.172C2D30--
 

From: "Niels Piersma" <niels@piersma.com>
To: <freebsd-gnats-submit@freebsd.org>, <keiji@hiemalis.org>
Cc:  
Subject: Re: kern/42465: bridge and ipfw problem
Date: Sat, 23 Nov 2002 08:44:02 +0100

 This is a multi-part message in MIME format.
 
 ------=_NextPart_000_0014_01C292CC.791CCEF0
 Content-Type: text/plain;
 	charset="US-ASCII"
 Content-Transfer-Encoding: 7bit
 
 Yes, forgot to tell, I also use the rl0 (realtek) card, I think I am
 gonna switch it with an fxp one. Maybe related?
 
  
 
 Niels Piersma
 
  
 
 Lijsterhof 12
 
 2371 PC Roelofarendsveen
 
 Phone:  +31 (0) 71 331 9239
 
 Fax:      +31 (0) 71 331 9247
 
 Mobile:  +31 (0) 61 424 8182
 
  
 
 
 ------=_NextPart_000_0014_01C292CC.791CCEF0
 Content-Type: text/html;
 	charset="US-ASCII"
 Content-Transfer-Encoding: quoted-printable
 
 <html>
 
 <head>
 <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
 charset=3Dus-ascii">
 
 
 <meta name=3DGenerator content=3D"Microsoft Word 10 (filtered)">
 
 <style>
 <!--
  /* Style Definitions */
  p.MsoNormal, li.MsoNormal, div.MsoNormal
 	{margin:0cm;
 	margin-bottom:.0001pt;
 	font-size:12.0pt;
 	font-family:"Times New Roman";}
 a:link, span.MsoHyperlink
 	{color:blue;
 	text-decoration:underline;}
 a:visited, span.MsoHyperlinkFollowed
 	{color:purple;
 	text-decoration:underline;}
 span.EmailStyle17
 	{font-family:Arial;
 	color:windowtext;}
 @page Section1
 	{size:612.0pt 792.0pt;
 	margin:72.0pt 90.0pt 72.0pt 90.0pt;}
 div.Section1
 	{page:Section1;}
 -->
 </style>
 
 </head>
 
 <body lang=3DEN-US link=3Dblue vlink=3Dpurple>
 
 <div class=3DSection1>
 
 <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
 style=3D'font-size:10.0pt;
 font-family:Arial'>Yes, forgot to tell, I also use the rl0 (realtek) =
 card, I think
 I am gonna switch it with an fxp one. Maybe related?</span></font></p>
 
 <p class=3DMsoNormal><font size=3D2 face=3DArial><span =
 style=3D'font-size:10.0pt;
 font-family:Arial'>&nbsp;</span></font></p>
 
 <p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DNL =
 style=3D'font-size:10.0pt;
 font-family:Arial'>Niels Piersma</span></font></p>
 
 <div style=3D'border:none;border-bottom:solid windowtext =
 1.0pt;padding:0cm 0cm 1.0pt 0cm'>
 
 <div style=3D'border:none;border-bottom:solid windowtext =
 1.0pt;padding:0cm 0cm 1.0pt 0cm'>
 
 <p class=3DMsoNormal style=3D'border:none;padding:0cm'><font size=3D2 =
 face=3DArial><span
 lang=3DNL =
 style=3D'font-size:10.0pt;font-family:Arial'>&nbsp;</span></font></p>
 
 </div>
 
 </div>
 
 <p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DNL =
 style=3D'font-size:10.0pt;
 font-family:Arial'>Lijsterhof 12</span></font></p>
 
 <p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DNL =
 style=3D'font-size:10.0pt;
 font-family:Arial'>2371 PC Roelofarendsveen</span></font></p>
 
 <p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DNL =
 style=3D'font-size:10.0pt;
 font-family:Arial'>Phone:&nbsp; +31 (0) 71 331 9239</span></font></p>
 
 <p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DNL =
 style=3D'font-size:10.0pt;
 font-family:Arial'>Fax:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +31 (0) 71 331 =
 9247</span></font></p>
 
 <p class=3DMsoNormal><font size=3D2 face=3DArial><span lang=3DNL =
 style=3D'font-size:10.0pt;
 font-family:Arial'>Mobile:&nbsp; +31 (0) 61 424 8182</span></font></p>
 
 <p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
 style=3D'font-size:
 12.0pt'>&nbsp;</span></font></p>
 
 </div>
 
 </body>
 
 </html>
 
 ------=_NextPart_000_0014_01C292CC.791CCEF0--
 
State-Changed-From-To: open->closed 
State-Changed-By: cjc 
State-Changed-When: Thu Dec 5 21:13:59 PST 2002 
State-Changed-Why:  
Fixed in -CURRENT (with the band-aid mentioned in the PR and more 
properly since) and -STABLE. 


Responsible-Changed-From-To: luigi->cjc 
Responsible-Changed-By: cjc 
Responsible-Changed-When: Thu Dec 5 21:13:59 PST 2002 
Responsible-Changed-Why:  
Stole it since I made the fixes. 

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