netfilter: synproxy: only register hooks when needed
Subsystems (2)
Florian Westphal
maintainerPATCH 1/1 netfilter: synproxy: only register hooks when needed
Defer registration of the synproxy hooks until the first SYNPROXY rule is added. Also means we only register hooks in namespaces that need it.
Signed-off-by Florian Westphal <[email protected]>
--- include/net/netfilter/nf_conntrack_synproxy.h | 2 + net/ipv4/netfilter/ipt_SYNPROXY.c | 73 ++++++++++++++------------- net/ipv6/netfilter/ip6t_SYNPROXY.c | 73 ++++++++++++++------------- 3 files changed, 80 insertions(+), 68 deletions(-)
include/net/netfilter/nf_conntrack_synproxy.h +2 -0
@@ -52,6 +52,8 @@ struct synproxy_stats {struct synproxy_net {struct nf_conn *tmpl;struct synproxy_stats __percpu *stats; +unsigned int hook_ref4; +unsigned int hook_ref6; };extern unsigned int synproxy_net_id;
net/ipv4/netfilter/ipt_SYNPROXY.c +39 -34
104 lines not on this page · raw message
net/ipv6/netfilter/ip6t_SYNPROXY.c +39 -34
105 lines not on this page · raw message
Signature · 1 line
2.10.2
Florian Westphal
maintainerQuoted 2 lines · Florian Westphal
Defer registration of the synproxy hooks until the first SYNPROXY rule is added. Also means we only register hooks in namespaces that need it.
On a related note: should I bother with CLUSTERIP or can be remove it?