Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5421029ybi; Wed, 12 Jun 2019 02:09:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqxZVIiDRMDJorTgAHxY47Q+wp7D/88kEIJ+FEyqojhOG5+H5fOm2F3hhftx/SG3pxP0zFe5 X-Received: by 2002:aa7:8ecb:: with SMTP id b11mr45551353pfr.220.1560330573512; Wed, 12 Jun 2019 02:09:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560330573; cv=none; d=google.com; s=arc-20160816; b=P5U8IRhWHmGShoEyeX20Tgi1HS3YLSi1qqZ7ryx3S0kOyy5XF44mSDr8+og6b3cIx+ 8o2LrlocdxcAflQAzLme6y/1XM6ollR8+wH+pGsoMbS97XwAWQMRmpHhCPGaYd/1/Gly QA5KX2JyGBtjliswuQ1H3kEJixkRcUf4MKjucVev+bW4nMUmjZNBZI9EFC1TJpT8GuyB 7XF4vNwbm+iXqmb6Ni4prILFvCnMNi2RZNtCFp4r3qKSfHljUrkoGEdHrK/8ejMLZF0Y 1X0TbRQFx9fiu4DG032RZBA6K8YYZ3YNPnkbOMqutLP81H2gFQgMQdYyHtStI1iAd6zZ pe8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=HCdMVrW16lt6yoyDR7O3j8+zrGOXO3mjjQE4Sn4sJzA=; b=vhHdRLR6siuZdjCx6AbQKCbNrlvuL4p55s8J6zXR6TF74sLoDXfQfT/1V9CfgF2+yd qO+RnYZvh1L9fBdznoUba/x9JnUdAayBQfWXtIzKQTQtlBJTa00dqoYoNh0THFHmLf6m kUnMYUKhDHoON4gDd8PCbHbjmjdjUtQ6zBwb/8gZfJj/+S1RTxrgFNquL2ucaGW8zBK9 ntfGo5uDTxOlT8I5mRmgJji5QkLQ24df9PF/L2hZz1zmVHXIutpNk1kXgfwTCQS+/OpX BzQc0xJW8SqeyzgjxJQSC20MOhItknga+MoljYKOZ1CDkLjVTfmYDNRo1Fd+wkG15zXg LM8A== 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 j17si15668124pfr.13.2019.06.12.02.09.16; Wed, 12 Jun 2019 02:09:33 -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 S1731869AbfFLIrn (ORCPT + 99 others); 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 Content-Type: text/plain X-Originating-IP: [10.133.213.239] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 } -- 2.7.4