From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=V8w60uDCqV6Ul+syvWShyLOQLdd5ErCupOLZ2qYgX8s=; b=wR4VsOBmYnIm215jBQlCZtdfB2SsGw2WvrTEYT9cdFIqKy25JsIS4WKn7vTWh622xt 5o2af2u4V21P6Gd4+ptUNHxzM9C11We346i65lIAKJ7ECkj/eOc8wTJJv0kJjlQyY/Tr niaiZ2ts65zBvAnIv4XBwFvFDL//5Bu4T8eZfcUqmJW35l7F6wkDb1iiQf1tjUI79UmL qvtXQVZ7yXL3vNQajCrZZfpXZDyb2TVyy/IgXniyh0+q71Sidr1eQCSmQYx5ZPZM8Sp7 eQzucUh++gRqBOM+dL4qDm75npr5Z9ZQhq0KkNezWfJJJ4tlQRjdKxSxTek6xPIIPnag VJbg== Date: Tue, 21 Mar 2017 16:32:45 -0700 From: Stephen Hemminger Message-ID: <20170321163245.34159349@xeon-e3> In-Reply-To: <20170321222845.8373-1-linus.luessing@c0d3.blue> References: <20170321222845.8373-1-linus.luessing@c0d3.blue> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Bridge] [PATCH v2] bridge: ebtables: fix reception of frames DNAT-ed to bridge device List-Id: Linux Ethernet Bridging List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Linus =?UTF-8?B?TMO8c3Npbmc=?= Cc: netdev@vger.kernel.org, bridge@lists.linux-foundation.org, linux-kernel@vger.kernel.org, coreteam@netfilter.org, netfilter-devel@vger.kernel.org, Jozsef Kadlecsik , "David S . Miller" , Pablo Neira Ayuso On Tue, 21 Mar 2017 23:28:45 +0100 Linus L=C3=BCssing wrote: > 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. If after > dnat'ing the packet is now destined to us then the skb->pkt_type > needs to be updated from PACKET_OTHERHOST to PACKET_HOST, too. Why not fix DNAT netfilter module rather than hacking bridge code here. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v2] bridge: ebtables: fix reception of frames DNAT-ed to bridge device Date: Tue, 21 Mar 2017 16:32:45 -0700 Message-ID: <20170321163245.34159349@xeon-e3> References: <20170321222845.8373-1-linus.luessing@c0d3.blue> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: netdev@vger.kernel.org, bridge@lists.linux-foundation.org, linux-kernel@vger.kernel.org, coreteam@netfilter.org, netfilter-devel@vger.kernel.org, Jozsef Kadlecsik , "David S . Miller" , Pablo Neira Ayuso To: Linus =?UTF-8?B?TMO8c3Npbmc=?= Return-path: In-Reply-To: <20170321222845.8373-1-linus.luessing@c0d3.blue> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: bridge-bounces@lists.linux-foundation.org Errors-To: bridge-bounces@lists.linux-foundation.org List-Id: netfilter-devel.vger.kernel.org On Tue, 21 Mar 2017 23:28:45 +0100 Linus L=C3=BCssing wrote: > 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. If after > dnat'ing the packet is now destined to us then the skb->pkt_type > needs to be updated from PACKET_OTHERHOST to PACKET_HOST, too. Why not fix DNAT netfilter module rather than hacking bridge code here. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758395AbdCUXc6 (ORCPT ); Tue, 21 Mar 2017 19:32:58 -0400 Received: from mail-pg0-f53.google.com ([74.125.83.53]:33430 "EHLO mail-pg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758358AbdCUXc4 (ORCPT ); Tue, 21 Mar 2017 19:32:56 -0400 Date: Tue, 21 Mar 2017 16:32:45 -0700 From: Stephen Hemminger To: Linus =?UTF-8?B?TMO8c3Npbmc=?= Cc: netdev@vger.kernel.org, "David S . Miller" , Pablo Neira Ayuso , Jozsef Kadlecsik , bridge@lists.linux-foundation.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] bridge: ebtables: fix reception of frames DNAT-ed to bridge device Message-ID: <20170321163245.34159349@xeon-e3> In-Reply-To: <20170321222845.8373-1-linus.luessing@c0d3.blue> References: <20170321222845.8373-1-linus.luessing@c0d3.blue> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v2LNXKYU026738 On Tue, 21 Mar 2017 23:28:45 +0100 Linus Lüssing wrote: > 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. If after > dnat'ing the packet is now destined to us then the skb->pkt_type > needs to be updated from PACKET_OTHERHOST to PACKET_HOST, too. Why not fix DNAT netfilter module rather than hacking bridge code here.