Date: Tue, 6 Mar 2007 10:39:46 +0300 From: Eygene Ryabinkin <rea-fbsd@codelabs.ru> To: "Bruce M. Simpson" <bms@FreeBSD.org> 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 Message-ID: <20070306073945.GR57456@codelabs.ru> In-Reply-To: <45EC3EFD.3000301@FreeBSD.org> References: <E1HNbWw-000LoF-Bo@pobox.codelabs.ru> <45E9F1E8.2000802@inse.ru> <20070304062203.GL80319@codelabs.ru> <E1HNbWw-000LoF-Bo@pobox.codelabs.ru> <45E9F1E8.2000802@inse.ru> <20070304160613.GN80319@codelabs.ru> <45EB4915.1090703@FreeBSD.org> <20070305145647.GT80319@codelabs.ru> <45EC3EFD.3000301@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Bruce, > >In my case if_bridge drops off the packet because firewall fails to > >recognize the packet as good: the interface that is passed to a > >pfil_hooks is bad (I mean not the one expected). > > > The ifp which your patch changes is that of the mbuf chain when bridge_input >determines it is not for the bridge, but should be forwarded locally. The patch > forces a locally forwarded frame to have the same ifp as it had when it came > into bridge_input. I can foresee problems if the same Ethernet destination > address exists on multiple bridge member interfaces. The code in the if_bridge.c changes the ifp anyway: I am just setting the ifp to a more sane value. > NetBSD consistently uses pfil_hooks for the if_bridge *and* ether_input paths, > FreeBSD currently calls ipfw directly for ether_input, which may make a > difference to the behaviour which you are seeing with VLANs. I am awfully sorry, but you're seem to be mistaken: if_bridge calls the ipfw directly only for the L2 filtering (when the net.link.bridge.ipfw is set to 1). This is processed by the block in if_bridge just above to the 'ipfwpass' label. But the L3 filtering is done fully by the pfil hooks, as I understand the code. Moreover, I am using 'pf' in my case, not the ipfw. >Not understanding if_bridge fully, or the coupling of ipfw with if_ethersubr.c, >I would hope that Andrew and others have more to say on this. I am too ;)) Thank you! -- Eygene
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070306073945.GR57456>