OSDN Git Service

netfilter: nf_flow_table: do not remove offload when other netns's interface is down
authorTaehee Yoo <ap420073@gmail.com>
Thu, 11 Oct 2018 18:46:29 +0000 (03:46 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jan 2020 13:49:59 +0000 (14:49 +0100)
commitefac7747ad303a0fc56de56bb0d37baa3d1a7d74
tree54b3b80bd68f62aab0b63f57e4a68472d3d287c1
parent528d86d44b82f1b3828cca544be9fcafa58051e9
netfilter: nf_flow_table: do not remove offload when other netns's interface is down

[ Upstream commit a3fb3698cadf27dc142b24394c401625e14d80d0 ]

When interface is down, offload cleanup function(nf_flow_table_do_cleanup)
is called and that checks whether interface index of offload and
index of link down interface is same. but only interface index checking
is not enough because flowtable is not pernet list.
So that, if other netns's interface that has index is same with offload
is down, that offload will be removed.
This patch adds netns checking code to the offload cleanup routine.

Fixes: 59c466dd68e7 ("netfilter: nf_flow_table: add a new flow state for tearing down offloading")
Signed-off-by: Taehee Yoo <ap420073@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