generic: fix netfilter xtables NFLOG and MARK not load on IPv4 on linux 6.6

This commit is contained in:
coolsnowwolf 2024-11-22 23:57:01 +08:00
parent 26cc6f2a46
commit 85d99596b4

View File

@ -1,43 +0,0 @@
Subject: [PATCH v2] netfilter: xtables: fix typo causing some targets to not load on IPv6
Date: Sat, 19 Oct 2024 08:05:07 +0300 [thread overview]
Message-ID: <20241019-xtables-typos-v2-1-6b8b1735dc8e@0upti.me> (raw)
These were added with the wrong family in 4cdc55e, which seems
to just have been a typo, but now ip6tables rules with --set-mark
don't work anymore, which is pretty bad.
Fixes: 0bfcb7b71e73 ("netfilter: xtables: avoid NFPROTO_UNSPEC where needed")
Reviewed-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Ilya Katsnelson <me@0upti.me>
---
Changes in v2:
- Fixed a typo in the commit message (that's karma).
- Replaced a reference to backport commit.
- Link to v1: https://lore.kernel.org/r/20241018-xtables-typos-v1-1-02a51789c0ec@0upti.me
---
net/netfilter/xt_NFLOG.c | 2 +-
net/netfilter/xt_mark.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- a/net/netfilter/xt_NFLOG.c
+++ b/net/netfilter/xt_NFLOG.c
@@ -68,7 +68,7 @@ static struct xt_target nflog_tg_reg[] _
{
.name = "NFLOG",
.revision = 0,
- .family = NFPROTO_IPV4,
+ .family = NFPROTO_IPV6,
.checkentry = nflog_tg_check,
.destroy = nflog_tg_destroy,
.target = nflog_tg,
--- a/net/netfilter/xt_mark.c
+++ b/net/netfilter/xt_mark.c
@@ -43,7 +43,7 @@ static struct xt_target mark_tg_reg[] __
{
.name = "MARK",
.revision = 2,
- .family = NFPROTO_IPV4,
+ .family = NFPROTO_IPV6,
.target = mark_tg,
.targetsize = sizeof(struct xt_mark_tginfo2),
.me = THIS_MODULE,