* [PATCH nf] netfilter: Use flowlabel flow key when re-routing mangled packets
@ 2024-06-06 10:23 Florian Westphal
2024-06-11 16:44 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Florian Westphal @ 2024-06-06 10:23 UTC (permalink / raw)
To: netfilter-devel; +Cc: Florian Westphal, Yi Chen
'ip6 dscp set $v' in an nftables outpute route chain has no effect.
While nftables does detect the dscp change and calls the reroute hook.
But ip6_route_me_harder never sets the dscp/flowlabel:
flowlabel/dsfield routing rules are ignored and no reroute takes place.
Thanks to Yi Chen for an excellent reproducer script that I used
to validate this change.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Reported-by: Yi Chen <yiche@redhat.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
---
net/ipv6/netfilter.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/ipv6/netfilter.c b/net/ipv6/netfilter.c
index 53d255838e6a..5d989d803009 100644
--- a/net/ipv6/netfilter.c
+++ b/net/ipv6/netfilter.c
@@ -36,6 +36,7 @@ int ip6_route_me_harder(struct net *net, struct sock *sk_partial, struct sk_buff
.flowi6_uid = sock_net_uid(net, sk),
.daddr = iph->daddr,
.saddr = iph->saddr,
+ .flowlabel = ip6_flowinfo(iph),
};
int err;
--
2.44.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH nf] netfilter: Use flowlabel flow key when re-routing mangled packets
2024-06-06 10:23 [PATCH nf] netfilter: Use flowlabel flow key when re-routing mangled packets Florian Westphal
@ 2024-06-11 16:44 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2024-06-11 16:44 UTC (permalink / raw)
To: Florian Westphal; +Cc: netfilter-devel, Yi Chen
On Thu, Jun 06, 2024 at 12:23:31PM +0200, Florian Westphal wrote:
> 'ip6 dscp set $v' in an nftables outpute route chain has no effect.
> While nftables does detect the dscp change and calls the reroute hook.
> But ip6_route_me_harder never sets the dscp/flowlabel:
> flowlabel/dsfield routing rules are ignored and no reroute takes place.
>
> Thanks to Yi Chen for an excellent reproducer script that I used
> to validate this change.
Applied to nf.git, thanks Florian
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-06-11 16:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-06 10:23 [PATCH nf] netfilter: Use flowlabel flow key when re-routing mangled packets Florian Westphal
2024-06-11 16:44 ` Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox