Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753444AbdCOSP7 (ORCPT ); Wed, 15 Mar 2017 14:15:59 -0400 Received: from mail.us.es ([193.147.175.20]:41236 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753349AbdCOSPv (ORCPT ); Wed, 15 Mar 2017 14:15:51 -0400 Date: Wed, 15 Mar 2017 19:15:39 +0100 From: Pablo Neira Ayuso To: Linus =?iso-8859-1?Q?L=FCssing?= 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: <20170315181539.GA31875@salvia> References: <20170315031811.22714-1-linus.luessing@c0d3.blue> <20170315102608.GB24366@breakpoint.cc> <20170315104211.GA24409@salvia> <20170315142720.GU15692@otheros> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170315142720.GU15692@otheros> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 757 Lines: 16 On Wed, Mar 15, 2017 at 03:27:20PM +0100, Linus L?ssing wrote: > On Wed, Mar 15, 2017 at 11:42:11AM +0100, Pablo Neira Ayuso wrote: > > I'm missing then why redirect is not then just enough for Linus usecase. > > For my usecase, the MAC address is configured by the user from a > Web-UI. It may or may not be the one from the bridge device. > > Besides, found it counter intuitive that DNAT did not work here > and took me some time to find out why. At least I didn't read about > any such known limitations of the dnat target in the ebtables > manpage. 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?