]> git.itanic.dy.fi Git - linux-stable/commit
netfilter: nft_flow_offload: fix checking method of conntrack helper
authorHenry Yen <henry.yen@mediatek.com>
Mon, 14 Jan 2019 09:59:43 +0000 (17:59 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Feb 2019 09:08:55 +0000 (10:08 +0100)
commit73aa8292cabad4f09ccd8cecf8adc9fd4abf2f8e
treeba73fe27693dc8f866024922007769f46dc884a7
parent4c3b23e90307d42ca2e6ae3211ecf9b7e61a5004
netfilter: nft_flow_offload: fix checking method of conntrack helper

[ Upstream commit 2314e879747e82896f51cce4488f6a00f3e1af7b ]

This patch uses nfct_help() to detect whether an established connection
needs conntrack helper instead of using test_bit(IPS_HELPER_BIT,
&ct->status).

The reason is that IPS_HELPER_BIT is only set when using explicit CT
target.

However, in the case that a device enables conntrack helper via command
"echo 1 > /proc/sys/net/netfilter/nf_conntrack_helper", the status of
IPS_HELPER_BIT will not present any change, and consequently it loses
the checking ability in the context.

Signed-off-by: Henry Yen <henry.yen@mediatek.com>
Reviewed-by: Ryder Lee <ryder.lee@mediatek.com>
Tested-by: John Crispin <john@phrozen.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nft_flow_offload.c