Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752888AbdCOKmd (ORCPT ); Wed, 15 Mar 2017 06:42:33 -0400 Received: from mail.us.es ([193.147.175.20]:43064 "EHLO mail.us.es" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752166AbdCOKmb (ORCPT ); Wed, 15 Mar 2017 06:42:31 -0400 Date: Wed, 15 Mar 2017 11:42:11 +0100 From: Pablo Neira Ayuso To: Florian Westphal Cc: Linus =?iso-8859-1?Q?L=FCssing?= , 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: <20170315104211.GA24409@salvia> References: <20170315031811.22714-1-linus.luessing@c0d3.blue> <20170315102608.GB24366@breakpoint.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170315102608.GB24366@breakpoint.cc> 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: 816 Lines: 17 On Wed, Mar 15, 2017 at 11:26:08AM +0100, Florian Westphal wrote: > Linus L?ssing wrote: > > When trying to redirect bridged frames to the bridge device itself > > via the ebtables nat-prerouting chain and the dnat target then this > > currently fails: > > > > The ethernet destination of the frame is dnat'ed to the MAC address of > > the bridge itself just fine and the correctly altered frame can even > > be captured via a tcpdump on br0 (with or without promisc mode). > > > > However, the IP code drops it in the beginning of ip_input.c/ip_rcv() > > as the dnat target did not update the skb->pkt_type. > > Right, thats the reason why ebtables also has ebt_redirect target > which does this pkt_type fixup. I'm missing then why redirect is not then just enough for Linus usecase.