From patchwork Wed Dec 18 08:32:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Koichiro Den X-Patchwork-Id: 2024781 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4YCn4l6pckz1ySq for ; Wed, 18 Dec 2024 19:33:11 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1tNpUK-0001za-Uq; Wed, 18 Dec 2024 08:33:00 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1tNpUJ-0001z9-Fk for kernel-team@lists.ubuntu.com; Wed, 18 Dec 2024 08:32:59 +0000 Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 4AE4C3F171 for ; Wed, 18 Dec 2024 08:32:58 +0000 (UTC) Received: by mail-pf1-f198.google.com with SMTP id d2e1a72fcca58-725e6fe074eso9120330b3a.0 for ; Wed, 18 Dec 2024 00:32:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734510777; x=1735115577; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vQUGzCKFkEuv5mfFSbGU7778/Sa1rL60rsDZnxOeYCs=; b=kOShwV9JHBOC9agSR9qRcHBrj6MmJ3/J+WwN4VMfGic6k141hz7bMFFxNsiWJiuOtj 1LLfTSDbM/bXayx01T6Yzch8MnLhvegOm19GnhBkOy8GCtpvMZlwlt42wwPUB4GQ0dDK NorkWhs7Y+UBtxIFeyFvkyzQoJbsjFNJH5C1SBAFwUiOxyDn/C1nClU9ItbQ71f9XK/y 8KVcA1znVNh1FH6Gc9xt9Kyr8UsO0cK4GT+2mY0aoK2gjF9pSgfsaU75aWYtzvHiJ9gI 76TvO1prRMycimG5TjyhAHhO8ibqgPSw8onoPDWN1f7fBOkXtxmq3KGzS3hgT6u7ofzh ETYg== X-Gm-Message-State: AOJu0Yx3Xf7R6MhUz1j7QoO4vAwbk5wag0clkQHXQBWlEOxiOJyw3iwZ 2BCvaST2XnampAqGTzlF1EowH416/pIehZ8yHiF2oBPHgQkDvywVmFG3w9PYWVC98MUOjB9BOTW 5BwELrXbDocqFOkETAxZ/9+6HxlKlq/h/lUfxioO1jVq6FO6/AyKvX8KSMCvHqInFRKnC+lbbxd BA6vy8xzM/KQ== X-Gm-Gg: ASbGncuTrOBoR6QqMRjps1FvbuS7Z+2Nlg20k9r4Bz3Sd6z/rTq2KcC0ON9fdWT+V8U v3hEIRrHif0c615MI1glwovPrKh7eWdWYG7v+4CAsfVBtGRayK7hGt6JAdMW21+ABkrTGtBLfip uDrdrZjWAwZtMLAE+bmSoAlMY0NhU0mfENRC+nGZMvttEU5wTNyw7mKTY6OuFSc0yp/wSn3UqV/ L7e4jp6Oywoxd59xIORdcfwFlicVRWa8xcG2+iNPQiPIu4T4pSyUhLFiaU7yeI8Ki65lcd8Nw== X-Received: by 2002:a05:6a20:72a0:b0:1e0:ae58:2945 with SMTP id adf61e73a8af0-1e5b4874badmr3628347637.31.1734510776724; Wed, 18 Dec 2024 00:32:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IEc6iHYvzwr/+3WOWrtQosNnRm/LI4oxJtXlJrOegMOOVUK7svrhO9D07lrXYZqbzB0jRsJ1g== X-Received: by 2002:a05:6a20:72a0:b0:1e0:ae58:2945 with SMTP id adf61e73a8af0-1e5b4874badmr3628325637.31.1734510776367; Wed, 18 Dec 2024 00:32:56 -0800 (PST) Received: from localhost.localdomain ([240f:74:7be:1:2337:517a:1b0:5954]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-801d5a90693sm7083546a12.9.2024.12.18.00.32.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2024 00:32:56 -0800 (PST) From: Koichiro Den To: kernel-team@lists.ubuntu.com Subject: [SRU][J][PATCH 1/1] netfilter: xtables: fix typo causing some targets not to load on IPv6 Date: Wed, 18 Dec 2024 17:32:26 +0900 Message-ID: <20241218083229.2508636-3-koichiro.den@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241218083229.2508636-1-koichiro.den@canonical.com> References: <20241218083229.2508636-1-koichiro.den@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Pablo Neira Ayuso BugLink: https://bugs.launchpad.net/bugs/2091990 [ Upstream commit 306ed1728e8438caed30332e1ab46b28c25fe3d8 ] - There is no NFPROTO_IPV6 family for mark and NFLOG. - TRACE is also missing module autoload with NFPROTO_IPV6. This results in ip6tables failing to restore a ruleset. This issue has been reported by several users providing incomplete patches. Very similar to Ilya Katsnelson's patch including a missing chunk in the TRACE extension. Fixes: 0bfcb7b71e73 ("netfilter: xtables: avoid NFPROTO_UNSPEC where needed") Reported-by: Ignat Korchagin Reported-by: Ilya Katsnelson Reported-by: Krzysztof Olędzki Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin (cherry picked from commit 90baa455aa7e099152898cfa5eb3928d6152da12 linux-5.15.y) Signed-off-by: Koichiro Den --- net/netfilter/xt_NFLOG.c | 2 +- net/netfilter/xt_TRACE.c | 1 + net/netfilter/xt_mark.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/net/netfilter/xt_NFLOG.c b/net/netfilter/xt_NFLOG.c index d80abd6ccaf8..6dcf4bc7e30b 100644 --- a/net/netfilter/xt_NFLOG.c +++ b/net/netfilter/xt_NFLOG.c @@ -79,7 +79,7 @@ static struct xt_target nflog_tg_reg[] __read_mostly = { { .name = "NFLOG", .revision = 0, - .family = NFPROTO_IPV4, + .family = NFPROTO_IPV6, .checkentry = nflog_tg_check, .destroy = nflog_tg_destroy, .target = nflog_tg, diff --git a/net/netfilter/xt_TRACE.c b/net/netfilter/xt_TRACE.c index f3fa4f11348c..a642ff09fc8e 100644 --- a/net/netfilter/xt_TRACE.c +++ b/net/netfilter/xt_TRACE.c @@ -49,6 +49,7 @@ static struct xt_target trace_tg_reg[] __read_mostly = { .target = trace_tg, .checkentry = trace_tg_check, .destroy = trace_tg_destroy, + .me = THIS_MODULE, }, #endif }; diff --git a/net/netfilter/xt_mark.c b/net/netfilter/xt_mark.c index f76fe04fc9a4..65b965ca40ea 100644 --- a/net/netfilter/xt_mark.c +++ b/net/netfilter/xt_mark.c @@ -62,7 +62,7 @@ static struct xt_target mark_tg_reg[] __read_mostly = { { .name = "MARK", .revision = 2, - .family = NFPROTO_IPV4, + .family = NFPROTO_IPV6, .target = mark_tg, .targetsize = sizeof(struct xt_mark_tginfo2), .me = THIS_MODULE,