From patchwork Wed Jun 12 08:47:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 1114361 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=huawei.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 45P0r31zbTz9sBr for ; Wed, 12 Jun 2019 18:47:47 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731865AbfFLIrn (ORCPT ); Wed, 12 Jun 2019 04:47:43 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:18138 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726636AbfFLIrm (ORCPT ); Wed, 12 Jun 2019 04:47:42 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id DB3D0222C3369D7533CC; Wed, 12 Jun 2019 16:47:38 +0800 (CST) Received: from localhost (10.133.213.239) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.439.0; Wed, 12 Jun 2019 16:47:28 +0800 From: YueHaibing To: , , , , CC: , , , , YueHaibing Subject: [PATCH net-next] netfilter: ipv6: Fix build error without CONFIG_IPV6 Date: Wed, 12 Jun 2019 16:47:15 +0800 Message-ID: <20190612084715.21656-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.10.2.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.133.213.239] X-CFilter-Loop: Reflected Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org If CONFIG_IPV6 is not set, building fails: net/bridge/netfilter/nf_conntrack_bridge.o: In function `nf_ct_bridge_pre': nf_conntrack_bridge.c:(.text+0x41c): undefined symbol `nf_ct_frag6_gather' net/bridge/netfilter/nf_conntrack_bridge.o: In function `nf_ct_bridge_post': nf_conntrack_bridge.c:(.text+0x820): undefined symbol `br_ip6_fragment' Reported-by: Hulk Robot Reported-by: Randy Dunlap Fixes: c9bb6165a16e ("netfilter: nf_conntrack_bridge: fix CONFIG_IPV6=y") Signed-off-by: YueHaibing --- include/linux/netfilter_ipv6.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/include/linux/netfilter_ipv6.h b/include/linux/netfilter_ipv6.h index 3a3dc4b..0e1febc 100644 --- a/include/linux/netfilter_ipv6.h +++ b/include/linux/netfilter_ipv6.h @@ -108,8 +108,11 @@ static inline int nf_ipv6_br_defrag(struct net *net, struct sk_buff *skb, return 1; return v6_ops->br_defrag(net, skb, user); -#else +#endif +#if IS_BUILTIN(CONFIG_IPV6) return nf_ct_frag6_gather(net, skb, user); +#else + return 1; #endif } @@ -133,8 +136,11 @@ static inline int nf_br_ip6_fragment(struct net *net, struct sock *sk, return 1; return v6_ops->br_fragment(net, sk, skb, data, output); -#else +#endif +#if IS_BUILTIN(CONFIG_IPV6) return br_ip6_fragment(net, sk, skb, data, output); +#else + return 1; #endif }