Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753948AbdCOVQ0 (ORCPT ); Wed, 15 Mar 2017 17:16:26 -0400 Received: from mail.aperture-lab.de ([138.201.29.205]:52882 "EHLO mail.aperture-lab.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751765AbdCOVQX (ORCPT ); Wed, 15 Mar 2017 17:16:23 -0400 Date: Wed, 15 Mar 2017 22:16:19 +0100 From: Linus =?utf-8?Q?L=C3=BCssing?= To: Pablo Neira Ayuso Cc: Florian Westphal , netdev@vger.kernel.org, "David S . Miller" , Stephen Hemminger , Jozsef Kadlecsik , bridge@lists.linux-foundation.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] bridge: ebtables: fix reception of frames DNAT-ed to bridge device Message-ID: <20170315211619.GA3464@otheros> References: <20170315031811.22714-1-linus.luessing@c0d3.blue> <20170315102608.GB24366@breakpoint.cc> <20170315104211.GA24409@salvia> <20170315142720.GU15692@otheros> <20170315181539.GA31875@salvia> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20170315181539.GA31875@salvia> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 699 Lines: 14 On Wed, Mar 15, 2017 at 07:15:39PM +0100, Pablo Neira Ayuso wrote: > Could you update ebtables dnat to check if the ethernet address > matches the one of the input bridge interface, so we mangle the > ->pkt_type accordingly from there, instead of doing this from the > core? Actually, that was the approach I thought about and went for first (and it would probably work for me). Just checking against the bridge device's net_device::dev_addr. I scratched it though, as I was afraid that the issue might still exist for people using some other upper device on top of the bridge device. For instance, macvlan? And iterating over the net_device::dev_addrs list seemed too costly for fast path to me.