From owner-freebsd-net@FreeBSD.ORG Thu Jan 27 00:05:54 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05A011065672 for ; Thu, 27 Jan 2011 00:05:54 +0000 (UTC) (envelope-from lists@rewt.org.uk) Received: from frankie.stf.rewt.org.uk (frankie.stf.rewt.org.uk [91.208.177.187]) by mx1.freebsd.org (Postfix) with ESMTP id B389C8FC14 for ; Thu, 27 Jan 2011 00:05:53 +0000 (UTC) Received: from [172.16.11.69] (jwh-laptop.barbary [172.16.11.69]) by frankie.stf.rewt.org.uk (Postfix) with ESMTPA id 325A45081E; Thu, 27 Jan 2011 00:05:45 +0000 (UTC) Message-ID: <4D40B6E1.2050506@rewt.org.uk> Date: Thu, 27 Jan 2011 00:05:53 +0000 From: Joe Holden User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: Alexander Zagrebin References: <20110125133226.GD67220@gw.zagrebin.ru> <4D3EF966.7010209@gmx.com> <20110126052147.GF67220@gw.zagrebin.ru> In-Reply-To: <20110126052147.GF67220@gw.zagrebin.ru> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org, Nikos Vassiliadis Subject: Re: 8.2-PRERELEASE: if_bridge ARP and broadcasts issues X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Jan 2011 00:05:54 -0000 On 26/01/2011 05:21, Alexander Zagrebin wrote: > Hi! > > On 25.01.2011 18:25:10 +0200, Nikos Vassiliadis wrote: > >>> The reason is in ARP handling code: it looks for an address of the interface >>> belonging to a bridge, but there is not check that a bridge is the same. >>> >>> Attached patch (patch-if_ether.c) fixes the issue. >>> >> >> I tried your patch and it works for me. > > Thanks for confirmation! > >> >>> 2. Broadcasts issue >>> >>> I have a box with two NICs: re0 and wlan0. re0 and wlan0 are members of the >>> bridge0. re0 has IP address 192.168.1.1; wlan0 hasn't an address configured. >>> I have the samba installed. The smbd and nmbd listens on the 192.168.1.1. >>> There are no problems with the clients connected to the re0, but the samba >>> clients connected to the wlan0 has problems with the network browsing and >>> domain logons. >>> I've found that nmbd doesn't receive udp broadcasts received on the wlan0, >>> though bridge0 successfully retransmits this broadcast out of re0. >>> I've looked in the sources, and it seems that in this case subnet broadcasts >>> have to be handled in ether_output(), but this doesn't work anyway... >>> >>> Can anybody help to fix this issue? >> >> As far as I recall, the recommended setup is to assign IP addresses to >> the bridge interface, not the member interfaces. Could you try this? > > Yes, when ip address is assigned to bridge0 or inbound interface > (wlan0 in this case) then there are no problems. > This may be used as workaround, but... > As there is no direct interdiction to use addresses bound to a member interfaces, > it seems it's a bug. > That is valid behaviour, that is how it should be done - other oses such as linux enforce this behaviour. Thanks, J