netfilter: conntrack: simplify init/uninit of L4 protocol trackers
authorDavide Caratti <dcaratti@redhat.com>
Mon, 7 Nov 2016 17:31:17 +0000 (18:31 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 9 Nov 2016 22:49:25 +0000 (23:49 +0100)
commit0e54d2179f650bac80d89a9def429dbdbed58c11
treeb31bc7daac4dc1213b9767e381a190eadc14f6ac
parent4e24877e61e8507c0843e4bddbc6ecccbfd2e87d
netfilter: conntrack: simplify init/uninit of L4 protocol trackers

modify registration and deregistration of layer-4 protocol trackers to
facilitate inclusion of new elements into the current list of builtin
protocols. Both builtin (TCP, UDP, ICMP) and non-builtin (DCCP, GRE, SCTP,
UDPlite) layer-4 protocol trackers usually register/deregister themselves
using consecutive calls to nf_ct_l4proto_{,pernet}_{,un}register(...).
This sequence is interrupted and rolled back in case of error; in order to
simplify addition of builtin protocols, the input of the above functions
has been modified to allow registering/unregistering multiple protocols.

Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/net/netfilter/nf_conntrack_l4proto.h
net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
net/netfilter/nf_conntrack_proto.c
net/netfilter/nf_conntrack_proto_dccp.c
net/netfilter/nf_conntrack_proto_gre.c
net/netfilter/nf_conntrack_proto_sctp.c
net/netfilter/nf_conntrack_proto_udplite.c