netfilter: use nf_conntrack_helpers_register when possible
authorLiping Zhang <zlpnobody@gmail.com>
Sun, 4 Jun 2017 15:25:05 +0000 (23:25 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 19 Jun 2017 17:13:21 +0000 (19:13 +0200)
commitd53e3fc3906c7fe82ff436e889c8416649268007
tree9535d3199167ae2a86cb011da4d7fcba83fd1e70
parent2becbbc547aa5ae7b92b35e71bee33706fb1b826
netfilter: use nf_conntrack_helpers_register when possible

amanda_helper, nf_conntrack_helper_ras and nf_conntrack_helper_q931 are
all arrays, so we can use nf_conntrack_helpers_register to register
the ct helper, this will help us to eliminate some "goto errX"
statements.

Also introduce h323_helper_init/exit helper function to register the ct
helpers, this is prepared for the followup patch, which will add net
namespace support for ct helper.

Signed-off-by: Liping Zhang <zlpnobody@gmail.com>
Acked-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/nf_conntrack_amanda.c
net/netfilter/nf_conntrack_h323_main.c