]> git.baikalelectronics.ru Git - kernel.git/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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 May 2022 07:57:33 +0000 (09:57 +0200)
commitfce193622313b31890597a61e75905183b202aa8
tree8ba946646a35b1fc7f5f18b122ef6d4b21e3a512
parentc35998eef332f24b4df95aab03c2847dd6f42f5b
netfilter: flowtable: move dst_check to packet path

[ Upstream commit 35d7b252b64db2da284c6bf7ff87999f4f98d8a9 ]

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: 9b435bd7f625 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nf_flow_table_core.c
net/netfilter/nf_flow_table_ip.c