[NETFILTER]: Fix incorrect argument to ip_nat_initialized() in ctnetlink
authorPablo Neira Ayuso <pablo@netfilter.org>
Mon, 5 Dec 2005 21:32:14 +0000 (13:32 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Dec 2005 21:32:14 +0000 (13:32 -0800)
ip_nat_initialized() takes enum ip_nat_manip_type as it's second argument,
not a hook number.

Noticed and initial patch by Marcus Sundberg <marcus@ingate.com>.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/netfilter/ip_conntrack_netlink.c

index 3fce91bcc0ba55f506e80d10b4785409715f73f0..70402e0ed00a2474cee2bb8b6161522cecd93641 100644 (file)
@@ -877,7 +877,7 @@ ctnetlink_change_status(struct ip_conntrack *ct, struct nfattr *cda[])
                DEBUGP("NAT status: %lu\n", 
                       status & (IPS_NAT_MASK | IPS_NAT_DONE_MASK));
                
-               if (ip_nat_initialized(ct, hooknum))
+               if (ip_nat_initialized(ct, HOOK2MANIP(hooknum)))
                        return -EEXIST;
                ip_nat_setup_info(ct, &range, hooknum);