From owner-freebsd-net@FreeBSD.ORG Tue Jan 25 17:42:51 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 936F1106566C for ; Tue, 25 Jan 2011 17:42:51 +0000 (UTC) (envelope-from andy@fud.org.nz) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 35ED58FC19 for ; Tue, 25 Jan 2011 17:42:50 +0000 (UTC) Received: by wwf26 with SMTP id 26so34835wwf.31 for ; Tue, 25 Jan 2011 09:42:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.227.156.67 with SMTP id v3mr6281459wbw.80.1295975755880; Tue, 25 Jan 2011 09:15:55 -0800 (PST) Sender: andy@fud.org.nz Received: by 10.227.11.130 with HTTP; Tue, 25 Jan 2011 09:15:55 -0800 (PST) In-Reply-To: <20110125133226.GD67220@gw.zagrebin.ru> References: <20110125133226.GD67220@gw.zagrebin.ru> Date: Wed, 26 Jan 2011 06:15:55 +1300 X-Google-Sender-Auth: rgCPKaLLhBA4hTtF4a4alBpmnVo Message-ID: From: Andrew Thompson To: Alexander Zagrebin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-net@freebsd.org 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: Tue, 25 Jan 2011 17:42:51 -0000 On 26 January 2011 02:32, Alexander Zagrebin wrote: > Hi! > > I've found some issues with the if_bridge on 8.2-PRERELEASE. > > 1. An ARP issue > > Suppose we have a box with the 4 interfaces: nic0, nic1, nic2, nic3. > The interfaces are linked pairwise using 2 bridge(4) interfaces: bridge0 > and bridge1. Only nic0 has an IP address assigned (for example, > 192.168.0.1/24). > So we have configuration like this: > > =A0192.168.0.1 > ---nic0---+ =A0 =A0 =A0 +---nic2--- > =A0 =A0 =A0 =A0 =A0| =A0 =A0 =A0 | > =A0 =A0 =A0 bridge0 bridge1 > =A0 =A0 =A0 =A0 =A0| =A0 =A0 =A0 | > ---nic1---+ =A0 =A0 =A0 +---nic3--- > > The problem: when ARP query about MAC address of 192.168.0.1 is received > on the nic2 or nic3, then system responds with the MAC address of the nic= 0, > though networks on the bridge0 and bridge1 are completely independent. > IMHO, it isn't correct. > > The reason is in ARP handling code: it looks for an address of the interf= ace > 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 have committed this, thanks.