]> git.baikalelectronics.ru Git - kernel.git/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)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 14 Jan 2019 11:50:59 +0000 (12:50 +0100)
commit10988e594de06c78063cb9d64a12a15984ffb4f3
tree89704152d4ea1fcbdb38eed1702772f839129764
parente34d8cfe00052f2b8eb171bc3353f742fed11839
netfilter: nft_flow_offload: fix checking method of conntrack helper

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>
net/netfilter/nft_flow_offload.c