Skip to content

Commit 306ed17

Browse files
committed
netfilter: xtables: fix typo causing some targets not to load on IPv6
- 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: 0bfcb7b ("netfilter: xtables: avoid NFPROTO_UNSPEC where needed") Reported-by: Ignat Korchagin <[email protected]> Reported-by: Ilya Katsnelson <[email protected]> Reported-by: Krzysztof Olędzki <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent 1230fe7 commit 306ed17

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

net/netfilter/xt_NFLOG.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ static struct xt_target nflog_tg_reg[] __read_mostly = {
7979
{
8080
.name = "NFLOG",
8181
.revision = 0,
82-
.family = NFPROTO_IPV4,
82+
.family = NFPROTO_IPV6,
8383
.checkentry = nflog_tg_check,
8484
.destroy = nflog_tg_destroy,
8585
.target = nflog_tg,

net/netfilter/xt_TRACE.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ static struct xt_target trace_tg_reg[] __read_mostly = {
4949
.target = trace_tg,
5050
.checkentry = trace_tg_check,
5151
.destroy = trace_tg_destroy,
52+
.me = THIS_MODULE,
5253
},
5354
#endif
5455
};

net/netfilter/xt_mark.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static struct xt_target mark_tg_reg[] __read_mostly = {
6262
{
6363
.name = "MARK",
6464
.revision = 2,
65-
.family = NFPROTO_IPV4,
65+
.family = NFPROTO_IPV6,
6666
.target = mark_tg,
6767
.targetsize = sizeof(struct xt_mark_tginfo2),
6868
.me = THIS_MODULE,

0 commit comments

Comments
 (0)