netfilter: Add helper array register/unregister functions
Add nf_ct_helper_init(), nf_conntrack_helpers_register() and nf_conntrack_helpers_unregister() functions to avoid repetitive opencoded initialization in helpers. This patch keeps an id parameter for nf_ct_helper_init() not to break helper matching by name that has been inconsistently exposed to userspace through ports, eg. ftp-2121, and through an incremental id, eg. tftp-1. Signed-off-by:Gao Feng <fgao@ikuai8.com> Signed-off-by:
Pablo Neira Ayuso <pablo@netfilter.org>
Showing
- include/net/netfilter/nf_conntrack_helper.h 15 additions, 0 deletionsinclude/net/netfilter/nf_conntrack_helper.h
- net/netfilter/nf_conntrack_ftp.c 18 additions, 40 deletionsnet/netfilter/nf_conntrack_ftp.c
- net/netfilter/nf_conntrack_helper.c 57 additions, 0 deletionsnet/netfilter/nf_conntrack_helper.c
- net/netfilter/nf_conntrack_irc.c 12 additions, 24 deletionsnet/netfilter/nf_conntrack_irc.c
- net/netfilter/nf_conntrack_sane.c 20 additions, 37 deletionsnet/netfilter/nf_conntrack_sane.c
- net/netfilter/nf_conntrack_sip.c 28 additions, 47 deletionsnet/netfilter/nf_conntrack_sip.c
- net/netfilter/nf_conntrack_tftp.c 15 additions, 33 deletionsnet/netfilter/nf_conntrack_tftp.c
Loading
Please register or sign in to comment