From: Amin Azez Subject: Re: RFC: Disable defered bridge hooks by default Date: Thu, 13 Jul 2006 16:29:09 +0100 Message-ID: <44B666C5.8040603@ufomechanic.net> References: <44AA3446.6050609@trash.net> <44AA3496.5050909@trash.net> <44AEFE20.3020307@shorewall.net> <44AF200F.9000204@trash.net> <44B493BC.5010302@snapgear.com> <44B654AF.2080401@ufomechanic.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Netfilter Development Mailinglist , Bart De Schuymer , Tom Eastep Return-path: To: Patrick McHardy In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: netfilter-devel-bounces@lists.netfilter.org Errors-To: netfilter-devel-bounces@lists.netfilter.org List-Id: netfilter-devel.vger.kernel.org * Patrick McHardy wrote, On 13/07/06 15:50: > On Thu, 13 Jul 2006, Amin Azez wrote: > >> * Patrick McHardy wrote, On 13/07/06 08:46: >> >>>> And possibly related, could this be done for arp lookups too, so >>>> that output mac matching is possible? >>> >>> Theoretically yes, but I'm trying to get rid of a problem here, >>> not introduce new ones :) >> >> The difficulty I am now trying to solve is that of SNAT-ing bridged >> traffic depending on the output port. >> >> Bridging is really layer2 routing and so it makes a lot of sense to >> handle it like this. > > And what will the usage scenario of this be? Intercepting some traffic types and sending them via alternate gateways, (i.e. VPN gateways if the VPN is up) for errr... people who don't want to change the network default gateway for the whole network; also, for managing certain services for multi-subnet'd segments. I guess its part of the fashion to do things in layer2 these days as it involves less infrastructure change. For them. I think Philip was right and my slight suggestion is wrong; I can't "look ahead" as ebtables would need to process the "look ahead" also, and influencing the look ahead (as well as counting the look-ahead packets) I think cracking open the bridge code to fit the same model as the ip routing code, so it works out how to bridge it at just the same point the routing code calculates a route and then output device; but saves the answer for later when the final hooks have been traversed. I think if ebtables becomes the answer it will just grow to be as big as iptables with all the extra matches iptables has, just as iptables has extra -p tcp and -p udp matches. Sam