diff options
author | Davide Caratti <dcaratti@redhat.com> | 2016-10-20 18:33:01 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-12-04 20:45:30 +0100 |
commit | 0c4e966eafff8253bec545d8c27b9efa231c1f62 (patch) | |
tree | 24ddd7a41a200d2149405c670b0465bc9d1a8d91 /net/netfilter/nf_nat_core.c | |
parent | cd7275146885e7bc532ee2e0186dfd2b5c0b745f (diff) | |
download | linux-stable-0c4e966eafff8253bec545d8c27b9efa231c1f62.tar.gz linux-stable-0c4e966eafff8253bec545d8c27b9efa231c1f62.tar.bz2 linux-stable-0c4e966eafff8253bec545d8c27b9efa231c1f62.zip |
netfilter: built-in NAT support for DCCP
CONFIG_NF_NAT_PROTO_DCCP is no more a tristate. When set to y, NAT
support for DCCP protocol is built-in into nf_nat.ko.
footprint test:
(nf_nat_proto_) | dccp || nf_nat
--------------------------+--------++--------
no builtin | 409800 || 2241312
DCCP builtin | - || 2578968
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nf_nat_core.c')
-rw-r--r-- | net/netfilter/nf_nat_core.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/netfilter/nf_nat_core.c b/net/netfilter/nf_nat_core.c index 5b9c884a452e..69b121d11275 100644 --- a/net/netfilter/nf_nat_core.c +++ b/net/netfilter/nf_nat_core.c @@ -682,6 +682,10 @@ int nf_nat_l3proto_register(const struct nf_nat_l3proto *l3proto) &nf_nat_l4proto_tcp); RCU_INIT_POINTER(nf_nat_l4protos[l3proto->l3proto][IPPROTO_UDP], &nf_nat_l4proto_udp); +#ifdef CONFIG_NF_NAT_PROTO_DCCP + RCU_INIT_POINTER(nf_nat_l4protos[l3proto->l3proto][IPPROTO_DCCP], + &nf_nat_l4proto_dccp); +#endif mutex_unlock(&nf_nat_proto_mutex); RCU_INIT_POINTER(nf_nat_l3protos[l3proto->l3proto], l3proto); |