netfilter: masquerade: attach nat extension if not present
authorFlorian Westphal <fw@strlen.de>
Thu, 20 Apr 2017 08:11:33 +0000 (10:11 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 26 Apr 2017 07:30:22 +0000 (09:30 +0200)
commitff459018d7cb13e43ee2f857949c26b235ccd9a5
tree0b27e138957dea7f0f0a7c3a1a3b146ce34c5695
parent22d4536d2c836f74421d01d534b3117223a822a0
netfilter: masquerade: attach nat extension if not present

Currently the nat extension is always attached as soon as nat module is
loaded.  However, most NAT uses do not need the nat extension anymore.

Prepare to remove the add-nat-by-default by making those places that need
it attach it if its not present yet.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/ipv4/netfilter/nf_nat_masquerade_ipv4.c
net/ipv6/netfilter/nf_nat_masquerade_ipv6.c