Bug 219402

Summary: "netfilter: xtables: avoid NFPROTO_UNSPEC where needed" misassigns protocol for IPv6
Product: Networking Reporter: Jean-Francois Roy (jf)
Component: Netfilter/IptablesAssignee: networking_netfilter-iptables (networking_netfilter-iptables)
Status: NEW ---    
Severity: normal CC: regressions
Priority: P3    
Hardware: All   
OS: Linux   
Kernel Version: 6.11.4 Subsystem:
Regression: Yes Bisected commit-id: 0bfcb7b71e735560077a42847f69597ec7dcc326

Description Jean-Francois Roy 2024-10-20 05:24:38 UTC
The recent patch sent by Florian Westphal <fw@strlen.de> appears to misassign the protocol for IPv6.

```
#if IS_ENABLED(CONFIG_IP6_NF_IPTABLES)
	{
		.name           = "MARK",
		.revision       = 2,
		.family         = NFPROTO_IPV4,
		.target         = mark_tg,
		.targetsize     = sizeof(struct xt_mark_tginfo2),
		.me             = THIS_MODULE,
	},
#endif
```

I believe this one should be `NFPROTO_IPV6`.

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/net/netfilter/xt_mark.c?id=0bfcb7b71e735560077a42847f69597ec7dcc326
Comment 1 The Linux kernel's regression tracker (Thorsten Leemhuis) 2024-10-21 04:45:51 UTC
Not my area of expertise, but from a quick look is seems to be a known
problem due to some typos and people are working on a fix here:

https://lore.kernel.org/all/20241019-xtables-typos-v3-1-66dd2eaacf2f@0upti.me/