Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3491590imu; Sun, 11 Nov 2018 16:18:29 -0800 (PST) X-Google-Smtp-Source: AJdET5fnD5HlXxO+YRSiaJYdCqCBA1+t0oWORZPoS7/jys4RZtLuM69Y09GSXXhRjJEZ7B1FAtsU X-Received: by 2002:a62:56dd:: with SMTP id h90-v6mr17837503pfj.225.1541981909797; Sun, 11 Nov 2018 16:18:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541981909; cv=none; d=google.com; s=arc-20160816; b=cZ1Ac/e22vkMYJ7QZCcabOzA8Wn/v/83p9+kgZ5Sx1IMrIBrtagWIgYs2LdtcMcCmM y9dYuYTdpIsF4ZeMyzKVYc7YXUBTTCYjAU+VKvQD3i0FQ5qZb0dF4udlT/OW1kfj/eDu CoMS8h+1PNkltAbWHA7W8PL8CtBYNUNbX1lW2AKg9bJwmVWdJsKDx97JEZKrmO8Tnnog qUzaGevWVtrZqCW0wGtGJQ1389FUV2P8oR2afGtcnRmbZz7LVR+PS7A0EuOAxX46ME7/ /qRGeZ36CyVa5ft9tsjF4JUJGjaAL7yjaBVaFeB6x4DjF049iPzWn1kVrwFupsm9hgLE Ur2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QD10vOvgKXNX71V+8IwHUcB/duK+x3Z/qPG7i+wiFes=; b=SDDJYT+ZloVkyWa0l5aAYCEemlW4PhNOOk7w+0Tj0bI6rgtTgoDwSKKwQteCCUI+6K vPxxstSUZWkGf1JSjntnW8vvRWVccH1ZQSUQVoZs+wJSuF+E+VqvHkQGTbGwijnDEBVR Wq4qNTg+MzuYYAsTYPL675otp9RFM/iWv+kxuzrxC7x1QrPOvkOcBxOa/FCFRIuXpspe A72imDiXExeafVtFNqfhkdOwYhjdwMwpvC+uym7cisLiO5ttDos5tj28mkoWC+3nkoJc MkCzjUHH2QYYLey9qAabcYHPxSYpLOoCMxB11VJJbsRIpoYrt5UUZpot7rex7ECemaks vf2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=W1VD0fKH; 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 m61-v6si16660186plb.311.2018.11.11.16.18.14; Sun, 11 Nov 2018 16:18:29 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=W1VD0fKH; 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 S1730523AbeKLKHF (ORCPT + 99 others); Mon, 12 Nov 2018 05:07:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:58420 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730126AbeKLIRF (ORCPT ); Mon, 12 Nov 2018 03:17:05 -0500 Received: from localhost (unknown [206.108.79.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 55251214DB; Sun, 11 Nov 2018 22:27:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975229; bh=BgEVqoD1PpYSlDeOV20LX1ri4tyfnkVBrcquTzol/hc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W1VD0fKHJmRrqwCRBF/NO0HJSvu1gXqnbAlJEDPU65k0H4FMWW75hSDi+SPNZbeyY jkePef7Ot2cqAHw2JLd7Wp77l+1u/dnpUDEivTQJ2e7VKKkYtyJ2AXMfUJnK7Jidkv Dh3cFxrOR0to6A7uN15CoMAmKlwQtHr0krRSHyXs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paolo Abeni , Pablo Neira Ayuso , Sasha Levin Subject: [PATCH 4.19 051/361] netfilter: xt_nat: fix DNAT target for shifted portmap ranges Date: Sun, 11 Nov 2018 14:16:38 -0800 Message-Id: <20181111221627.200856079@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Paolo Abeni [ Upstream commit cb20f2d2c0507d60d94ef896991e95708f051dd1 ] The commit 2eb0f624b709 ("netfilter: add NAT support for shifted portmap ranges") did not set the checkentry/destroy callbacks for the newly added DNAT target. As a result, rulesets using only such nat targets are not effective, as the relevant conntrack hooks are not enabled. The above affect also nft_compat rulesets. Fix the issue adding the missing initializers. Fixes: 2eb0f624b709 ("netfilter: add NAT support for shifted portmap ranges") Signed-off-by: Paolo Abeni Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- net/netfilter/xt_nat.c | 2 ++ 1 file changed, 2 insertions(+) --- a/net/netfilter/xt_nat.c +++ b/net/netfilter/xt_nat.c @@ -216,6 +216,8 @@ static struct xt_target xt_nat_target_re { .name = "DNAT", .revision = 2, + .checkentry = xt_nat_checkentry, + .destroy = xt_nat_destroy, .target = xt_dnat_target_v2, .targetsize = sizeof(struct nf_nat_range2), .table = "nat",