]> git.itanic.dy.fi Git - linux-stable/commit
netfilter: flowtable: move dst_check to packet path
authorRitaro Takenaka <ritarot634@gmail.com>
Tue, 17 May 2022 10:55:30 +0000 (12:55 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 18 May 2022 15:34:26 +0000 (17:34 +0200)
commit2738d9d963bd1f06d5114c2b4fa5771a95703991
treea7d192ce684e8e9b070cc62fc936388647d27e41
parente5eaac2beb54f0a16ff851125082d9faeb475572
netfilter: flowtable: move dst_check to packet path

Fixes sporadic IPv6 packet loss when flow offloading is enabled.

IPv6 route GC and flowtable GC are not synchronized.
When dst_cache becomes stale and a packet passes through the flow before
the flowtable GC teardowns it, the packet can be dropped.
So, it is necessary to check dst every time in packet path.

Fixes: 227e1e4d0d6c ("netfilter: nf_flowtable: skip device lookup from interface index")
Signed-off-by: Ritaro Takenaka <ritarot634@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_flow_table_core.c
net/netfilter/nf_flow_table_ip.c