From meno.abels@adviser.com  Tue Dec 27 10:51:20 2005
Return-Path: <meno.abels@adviser.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 8D0D816A41F
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 27 Dec 2005 10:51:20 +0000 (GMT)
	(envelope-from meno.abels@adviser.com)
Received: from ms-1.de.20six.net (tiger.de.20six.net [84.16.227.200])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 2B39143D53
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 27 Dec 2005 10:51:19 +0000 (GMT)
	(envelope-from meno.abels@adviser.com)
Received: from ssh.tiger.de.20six.net ([172.20.20.130] helo=tiger.de.20six.net)
	by ms-1.de.20six.net with smtp (Exim 4.60 (FreeBSD))
	(envelope-from <meno.abels@adviser.com>)
	id 1ErCQI-0002dV-52; Tue, 27 Dec 2005 11:51:18 +0100
Received: by tiger.de.20six.net (sSMTP sendmail emulation); Tue, 27 Dec 2005 11:51:18 +0100
Message-Id: <20051227105119.2B39143D53@mx1.FreeBSD.org>
Date: Tue, 27 Dec 2005 11:51:18 +0100
From: Meno Abels <meno.abels@adviser.com>
Reply-To: Meno Abels <meno.abels@adviser.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc: meno.abels@adviser.com
Subject: [net] [patch] if_bridge does not handle arp for own addresses
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         90973
>Category:       kern
>Synopsis:       [net] [patch] if_bridge does not handle arp for own addresses
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    thompsa
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 27 11:00:12 GMT 2005
>Closed-Date:    
>Last-Modified:  Sun Jun 25 11:30:20 GMT 2006
>Originator:     Meno Abels
>Release:        FreeBSD 6.0-RELEASE i386
>Organization:
Adviser COM
>Environment:
System: FreeBSD sshd 6.0-RELEASE FreeBSD 6.0-RELEASE #1: Thu Jul 28 23:45:40 MEST 2005 root@tiger.de.20six.net:/jails/tiger/usr/obj/jails/tiger/usr/src_5.4/sys/GENERIC i386

>Description:
	If you have for example the following config:
		lnc1: 192.168.100.1
		tap1: 
	and these interfaces are bridged:
		ifconfig bridge0 addm lnc1 addm tap1 up
	If you now send packets over tap1 to 192.168.100.1 the arp lookup is not answered by 
	bridged host.
	
>How-To-Repeat:
	ping and arp -d
>Fix:
	In if_ether.c the detection of the bridge works on every bridge interfaces but
        not for the bridged(if_bridge) interface himself. This dectection is only required if
	there is a cloned bridge interface. So I added these:

--- sys/netinet/if_ether.c      7 Oct 2005 01:51:29 -0000       1.137.2.4
+++ sys/netinet/if_ether.c      27 Dec 2005 10:33:31 -0000
@@ -607,7 +607,7 @@
        int carp_match = 0;
 #endif
 
-       if (do_bridge || ifp->if_bridge)
+       if (do_bridge || ifp->if_bridge || ifp->if_type == IFT_BRIDGE)
                bridged = 1;
 
        req_len = arphdr_len2(ifp->if_addrlen, sizeof(struct in_addr));


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->thompsa 
Responsible-Changed-By: glebius 
Responsible-Changed-When: Wed Dec 28 10:10:28 UTC 2005 
Responsible-Changed-Why:  
To owner of code. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=90973 
State-Changed-From-To: open->patched 
State-Changed-By: thompsa 
State-Changed-When: Thu Jan 12 21:06:07 UTC 2006 
State-Changed-Why:  
Committed to HEAD, thanks for the patch. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=90973 
State-Changed-From-To: patched->closed 
State-Changed-By: thompsa 
State-Changed-When: Thu Jan 19 01:08:09 UTC 2006 
State-Changed-Why:  
MFC complete, thanks for the patch. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=90973 
State-Changed-From-To: closed->open 
State-Changed-By: thompsa 
State-Changed-When: Sun Jan 29 23:26:19 UTC 2006 
State-Changed-Why:  
I have had to back this out as it causes two arp replies to be sent, will have to look into it further. 

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

From: "Arjan van der Velde" <a.vandervelde@xs4all.nl>
To: <bug-followup@FreeBSD.org>, <meno.abels@adviser.com>
Cc:  
Subject: Re: kern/90973: [net] [patch] if_bridge does not handle arp for own addresses
Date: Sun, 25 Jun 2006 13:25:58 +0200

 This is a multi-part message in MIME format.
 
 ------=_NextPart_000_0001_01C6985A.E4F15E60
 Content-Type: text/plain;
 	charset="us-ascii"
 Content-Transfer-Encoding: 7bit
 
 Is there an ETA for a fix of this bug?
  
 -- Arjan
 
 ------=_NextPart_000_0001_01C6985A.E4F15E60
 Content-Type: text/html;
 	charset="us-ascii"
 Content-Transfer-Encoding: quoted-printable
 
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 <HTML><HEAD>
 <META http-equiv=3DContent-Type content=3D"text/html; =
 charset=3Dus-ascii">
 <META content=3D"MSHTML 6.00.2800.1555" name=3DGENERATOR></HEAD>
 <BODY>
 <DIV><FONT face=3DArial size=3D2><SPAN class=3D448032511-25062006>Is =
 there an ETA for=20
 a fix of this bug?</SPAN></FONT></DIV>
 <DIV><FONT face=3DArial size=3D2><SPAN=20
 class=3D448032511-25062006></SPAN></FONT>&nbsp;</DIV>
 <DIV><FONT face=3DArial size=3D2><SPAN class=3D448032511-25062006>--=20
 Arjan</SPAN></FONT></DIV></BODY></HTML>
 
 ------=_NextPart_000_0001_01C6985A.E4F15E60--
 
>Unformatted:
