Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1758656ybl; Sat, 31 Aug 2019 01:40:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqz8gzj5W9GMIxn+xhSm+JGvz0NGiT6V7KgGC6hcAA2nKcHZiOkBvmpK4qybTxPLLS0J/MRT X-Received: by 2002:a17:902:244:: with SMTP id 62mr19833678plc.243.1567240818510; Sat, 31 Aug 2019 01:40:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567240818; cv=none; d=google.com; s=arc-20160816; b=J7eQlTLPbAqEOqNUjXg2GaaLj5+lCJvo/g2XFTfh3njOyc1BFHLNO25osRaDvBUI1o 7MFBsru6doY3YsWhRKLnVnoO/fxcSyXMvKcjfmmicFhJgHjoIOMhzU3jqmN5kPxM2Jt8 bfoL/RkjvlFzKMIKKIK8ZwVdbMdkgIqdE6+FiyYCKtS6CBBfS+ZpedW8sShX1WLdvIPs +DzcSAhsrKSfYhR4tDi4XPOBgshArrCt3ijvnPJq0Hmio+VWEnE1t858sOAm6IEtPF/y R0QPXzliQ3/ag4M1sw25dorOhPXz5EREGhbwSQrL6wHN6uY4Cvpp5SppgNnFu9q7FY5t aIlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=95Qj/bYDt0pZGSIALoyizAtfA3U0zJMw/oVbIW+vG4A=; b=Pz0mMFuHZeBUe2DPTu8QomUtrfvCISGAO+83+JlUPVxY8DtYydNh5R2KbyyoBlP1tV dOtr8viwVSFB7IvFkc3rJ6uByf3jPbjye8fJbprlbhcGK3stT/+Yc2QJuvZOTEFY3/Hg g4mrkCap3B2qnIEJ4Lsl/V779ES8cEmZ6ZX02gtaGGPYqHeAJf0T/kFoLxF/lN1SilYn rQC9dSK2PE+KDWyDgiGeRBjK/dAsiGJJ+lzctwS6VqYDnMLTrOVKDjudghSFuCdm39j6 cWItrCGCq1kB0EY+Pk17HElXw3NWpdq8KGBwp2U9qjhd4H+h3UYqHNIMotPfdcbEGoUO 8PfQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m63si6481811pld.238.2019.08.31.01.40.03; Sat, 31 Aug 2019 01:40:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727284AbfHaIjG (ORCPT + 99 others); Sat, 31 Aug 2019 04:39:06 -0400 Received: from Chamillionaire.breakpoint.cc ([193.142.43.52]:60044 "EHLO Chamillionaire.breakpoint.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726402AbfHaIjG (ORCPT ); Sat, 31 Aug 2019 04:39:06 -0400 Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1i3yuR-0000g8-4S; Sat, 31 Aug 2019 10:38:59 +0200 Date: Sat, 31 Aug 2019 10:38:59 +0200 From: Florian Westphal To: Leonardo Bras Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org, bridge@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , Roopa Prabhu , Nikolay Aleksandrov , "David S. Miller" Subject: Re: [PATCH v5 1/1] net: br_netfiler_hooks: Drops IPv6 packets if IPv6 module is not loaded Message-ID: <20190831083859.GT20113@breakpoint.cc> References: <20190831044032.31931-1-leonardo@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190831044032.31931-1-leonardo@linux.ibm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Leonardo Bras wrote: > A kernel panic can happen if a host has disabled IPv6 on boot and have to > process guest packets (coming from a bridge) using it's ip6tables. > > IPv6 packets need to be dropped if the IPv6 module is not loaded, and the > host ip6tables will be used. > > Signed-off-by: Leonardo Bras > --- > Changes from v4: > - Check if the host ip6tables is going to be used before testing > ipv6 module presence > - Adds a warning about ipv6 module disabled. > > > net/bridge/br_netfilter_hooks.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/net/bridge/br_netfilter_hooks.c b/net/bridge/br_netfilter_hooks.c > index d3f9592f4ff8..af7800103e51 100644 > --- a/net/bridge/br_netfilter_hooks.c > +++ b/net/bridge/br_netfilter_hooks.c > @@ -496,6 +496,10 @@ static unsigned int br_nf_pre_routing(void *priv, > if (!brnet->call_ip6tables && > !br_opt_get(br, BROPT_NF_CALL_IP6TABLES)) > return NF_ACCEPT; > + if (!ipv6_mod_enabled()) { > + pr_warn_once("Module ipv6 is disabled, so call_ip6tables is not supported."); > + return NF_DROP; > + } pr_warn_once needs a '\n'. Pablo, can you mangle this locally when applying? Patch looks good to me, so: Acked-by: Florian Westphal