Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3732626imm; Mon, 18 Jun 2018 03:10:10 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLYE2XORD+YVOnGsTHh1543u7HF4NJcP1CZYax+UfL7im1MfnXBgF4sAoD4TGoepg/Rs9yO X-Received: by 2002:a62:1411:: with SMTP id 17-v6mr12845778pfu.3.1529316610014; Mon, 18 Jun 2018 03:10:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529316609; cv=none; d=google.com; s=arc-20160816; b=CNieDVnQk3NzJe7kU9ySGlN1fR5jHunfJ3fG8JA9UYnneexYpw9zlPpNhElNV5v+dr fyS2qAL7oiROQFPBc0ar5xw1P/7LsEFbC1SjeOFxx95pnxjs4Umlx/yoTkf3tLL760Cb ze61Ry2gISL3rFWaBXRt4xV1/krO0OTIHe53rPZ/OzkxCb7pUqp86+axPF2USMreErhl m4mhCl0oS4hB8QFqja/HSM9EqIocdN2Eqv81PPQtBIM0WdJ0OARiSqO71sSgsOJ1kwry aEKwdXqTl035EwtC5hMFjo7Lr9qzF54pS/3lL1jehZB1x6tFhQXnD7qf69UlkoGDiT8d 4IFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=E7wix+FgAuZBg+ev2VYLmDvIM/omhMEPnEmtUSChfvY=; b=Cckx++CvalxUN2o9atB2gFUUqtWOyrK1qMNluYdtBSB6WO2uar7u1L8zjWJ0gkpqHl Umt+ffUEh9rq/cYZV+qJyinEJyQS9EkzMfeQ4TcRB/6P4ur+c0QkHDZVcCVIWdZ49EyD BAZ1oLrddJoYUAPLJmWIJvChB0hT/mpxJRycozUmaX+FGeJCyub+wKy4090u7xwmrUrd DsjVe7hJxuTmZBI3XSDFEempDJDKxh2vaXYwrbnrWT8WVelC9Wfppjq1Nph7skzsmRLn aNpacwDD/eEqNqkw8u39Bz5j+h56bPLs7WTE9/4jRmHy/N2ou0DDx88G6HZIpPmMqoyD pKuQ== 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 y10-v6si12096907pgq.54.2018.06.18.03.09.55; Mon, 18 Jun 2018 03:10:09 -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 S935427AbeFRKHZ (ORCPT + 99 others); Mon, 18 Jun 2018 06:07:25 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:54078 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934770AbeFRIRT (ORCPT ); Mon, 18 Jun 2018 04:17:19 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 5153AC7A; Mon, 18 Jun 2018 08:17:18 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kbuild test robot , Pablo Neira Ayuso , Sasha Levin Subject: [PATCH 4.16 054/279] netfilter: nf_tables: NAT chain and extensions require NF_TABLES Date: Mon, 18 Jun 2018 10:10:39 +0200 Message-Id: <20180618080611.076710405@linuxfoundation.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180618080608.851973560@linuxfoundation.org> References: <20180618080608.851973560@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Pablo Neira Ayuso [ Upstream commit 39f2ff0816e5421476c2bc538b68b4bb0708a78e ] Move these options inside the scope of the 'if' NF_TABLES and NF_TABLES_IPV6 dependencies. This patch fixes: net/ipv6/netfilter/nft_chain_nat_ipv6.o: In function `nft_nat_do_chain': >> net/ipv6/netfilter/nft_chain_nat_ipv6.c:37: undefined reference to `nft_do_chain' net/ipv6/netfilter/nft_chain_nat_ipv6.o: In function `nft_chain_nat_ipv6_exit': >> net/ipv6/netfilter/nft_chain_nat_ipv6.c:94: undefined reference to `nft_unregister_chain_type' net/ipv6/netfilter/nft_chain_nat_ipv6.o: In function `nft_chain_nat_ipv6_init': >> net/ipv6/netfilter/nft_chain_nat_ipv6.c:87: undefined reference to `nft_register_chain_type' that happens with: CONFIG_NF_TABLES=m CONFIG_NFT_CHAIN_NAT_IPV6=y Fixes: 02c7b25e5f54 ("netfilter: nf_tables: build-in filter chain type") Reported-by: kbuild test robot Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- net/ipv6/netfilter/Kconfig | 55 ++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 27 deletions(-) --- a/net/ipv6/netfilter/Kconfig +++ b/net/ipv6/netfilter/Kconfig @@ -48,6 +48,34 @@ config NFT_CHAIN_ROUTE_IPV6 fields such as the source, destination, flowlabel, hop-limit and the packet mark. +if NF_NAT_IPV6 + +config NFT_CHAIN_NAT_IPV6 + tristate "IPv6 nf_tables nat chain support" + help + This option enables the "nat" chain for IPv6 in nf_tables. This + chain type is used to perform Network Address Translation (NAT) + packet transformations such as the source, destination address and + source and destination ports. + +config NFT_MASQ_IPV6 + tristate "IPv6 masquerade support for nf_tables" + depends on NFT_MASQ + select NF_NAT_MASQUERADE_IPV6 + help + This is the expression that provides IPv4 masquerading support for + nf_tables. + +config NFT_REDIR_IPV6 + tristate "IPv6 redirect support for nf_tables" + depends on NFT_REDIR + select NF_NAT_REDIRECT + help + This is the expression that provides IPv4 redirect support for + nf_tables. + +endif # NF_NAT_IPV6 + config NFT_REJECT_IPV6 select NF_REJECT_IPV6 default NFT_REJECT @@ -107,39 +135,12 @@ config NF_NAT_IPV6 if NF_NAT_IPV6 -config NFT_CHAIN_NAT_IPV6 - depends on NF_TABLES_IPV6 - tristate "IPv6 nf_tables nat chain support" - help - This option enables the "nat" chain for IPv6 in nf_tables. This - chain type is used to perform Network Address Translation (NAT) - packet transformations such as the source, destination address and - source and destination ports. - config NF_NAT_MASQUERADE_IPV6 tristate "IPv6 masquerade support" help This is the kernel functionality to provide NAT in the masquerade flavour (automatic source address selection) for IPv6. -config NFT_MASQ_IPV6 - tristate "IPv6 masquerade support for nf_tables" - depends on NF_TABLES_IPV6 - depends on NFT_MASQ - select NF_NAT_MASQUERADE_IPV6 - help - This is the expression that provides IPv4 masquerading support for - nf_tables. - -config NFT_REDIR_IPV6 - tristate "IPv6 redirect support for nf_tables" - depends on NF_TABLES_IPV6 - depends on NFT_REDIR - select NF_NAT_REDIRECT - help - This is the expression that provides IPv4 redirect support for - nf_tables. - endif # NF_NAT_IPV6 config IP6_NF_IPTABLES