From owner-freebsd-net@FreeBSD.ORG Tue Jan 25 13:32:30 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 58DC51065670 for ; Tue, 25 Jan 2011 13:32:30 +0000 (UTC) (envelope-from alex@zagrebin.ru) Received: from mail.zagrebin.ru (gw.zagrebin.ru [91.215.205.128]) by mx1.freebsd.org (Postfix) with ESMTP id 000138FC0C for ; Tue, 25 Jan 2011 13:32:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zagrebin.ru; s=mail; h=Content-Type:MIME-Version:Message-ID:Subject:To:From:Date; bh=tBANRWsBQIUeMjYOUK0HqqxaiwcLqnEXYvNJSQRHerI=; b=y8msLtfodwSjjVeUobfdSCWqJUm4yI3sSAV60dfTg4kOrb3opCXrS9aUgYRx01EKfUFdfQTCQdCngbJB4KSLbHBGHcd5iiSUIbRNoSOHTbZhOHwM5YuPaiG3DH9nyEg80dgZmU+23k9eho+qH1Y3JlsW5n8Kvbug7c4eTzoSr3M=; Received: from alex by mail.zagrebin.ru with local (Exim 4.73 (FreeBSD)) (envelope-from ) id 1Phj0V-000FCG-4u for freebsd-net@freebsd.org; Tue, 25 Jan 2011 16:32:27 +0300 Date: Tue, 25 Jan 2011 16:32:26 +0300 From: Alexander Zagrebin To: freebsd-net@freebsd.org Message-ID: <20110125133226.GD67220@gw.zagrebin.ru> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MW5yreqqjyrRcusr" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: 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 13:32:30 -0000 --MW5yreqqjyrRcusr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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: 192.168.0.1 ---nic0---+ +---nic2--- | | bridge0 bridge1 | | ---nic1---+ +---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 nic0, 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 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. 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? -- Alexander Zagrebin --MW5yreqqjyrRcusr--