From owner-freebsd-net@FreeBSD.ORG Sun Mar 4 22:32:57 2007 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 32AF216A402; Sun, 4 Mar 2007 22:32:57 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from out5.smtp.messagingengine.com (out5.smtp.messagingengine.com [66.111.4.29]) by mx1.freebsd.org (Postfix) with ESMTP id F3F0E13C467; Sun, 4 Mar 2007 22:32:56 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from out1.internal (unknown [10.202.2.149]) by out1.messagingengine.com (Postfix) with ESMTP id CF6A11F543A; Sun, 4 Mar 2007 17:32:56 -0500 (EST) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by out1.internal (MEProxy); Sun, 04 Mar 2007 17:32:56 -0500 X-Sasl-enc: bLOb3i5223jvpT6iiysPd1AWsvFbsN20aaeopQZ9Frfj 1173047576 Received: from [192.168.123.18] (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTP id E08F433752; Sun, 4 Mar 2007 17:32:54 -0500 (EST) Message-ID: <45EB4915.1090703@FreeBSD.org> Date: Sun, 04 Mar 2007 22:32:53 +0000 From: "Bruce M. Simpson" User-Agent: Thunderbird 1.5.0.9 (X11/20070125) MIME-Version: 1.0 To: Eygene Ryabinkin References: <45E9F1E8.2000802@inse.ru> <20070304062203.GL80319@codelabs.ru> <45E9F1E8.2000802@inse.ru> <20070304160613.GN80319@codelabs.ru> In-Reply-To: <20070304160613.GN80319@codelabs.ru> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: rik@FreeBSD.org, freebsd-net@freebsd.org, glebius@FreeBSD.org, andre@FreeBSD.org, thompsa@FreeBSD.org Subject: Re: kern/109815: wrong interface identifier at pfil_hooks for vlans + if_bridge 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: Sun, 04 Mar 2007 22:32:57 -0000 Hi, I haven't seen your patch, can you point me at it off-list? Thanks. Eygene Ryabinkin wrote: > > I traced the current if_bridge.c behaviour to the NetBSD's if_bridge.c > 1.9. This was the first version in that the firewall hooks were > introduced. And the assumtion that the MAC identifies the physical > interfaces was used in this first version. > > And a question: can anyone say if my patch will break some known > good behaviour and if the current behaviour of if_bridge is based > on some logic I am currently failing to understand. > I would greatly appreciate it if you could look at the combined M_PROMISC and 802.1p patch, which rewrites ether_input() significantly. It sounds like the issues you are having with vlans and bridges may potentially be fixed by this patch, or that the fix may be incorporated more easily with this patch. In NetBSD, after if_bridge is given a chance to claim an input frame, the ifp may be changed if the bridge needs to forward locally. M_PROMISC is used to indicate that a frame was received promiscuously, in case ether_input() re-enters itself with the same mbuf chain. Certain consumers of ether_input() need to punch holes in the logic used to detect if a frame was for us or not because they do funky things with Ethernet destination addresses, e.g. carp. Regards, BMS