]> err.no Git - linux-2.6/blobdiff - net/ipv4/netfilter/nf_nat_standalone.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
[linux-2.6] / net / ipv4 / netfilter / nf_nat_standalone.c
index 51a2708f7bf06d5677b38fd6a632c3791cace81f..46cc99def165fc5e80f5ae3f1596890afa17f6e6 100644 (file)
 #include <net/netfilter/nf_nat_helper.h>
 #include <linux/netfilter_ipv4/ip_tables.h>
 
-#if 0
-#define DEBUGP printk
-#else
-#define DEBUGP(format, args...)
-#endif
-
 #ifdef CONFIG_XFRM
 static void nat_decode_session(struct sk_buff *skb, struct flowi *fl)
 {
@@ -117,7 +111,7 @@ nf_nat_fn(unsigned int hooknum,
        if (!nat) {
                nat = nf_ct_ext_add(ct, NF_CT_EXT_NAT, GFP_ATOMIC);
                if (nat == NULL) {
-                       DEBUGP("failed to add NAT extension\n");
+                       pr_debug("failed to add NAT extension\n");
                        return NF_ACCEPT;
                }
        }
@@ -154,9 +148,9 @@ nf_nat_fn(unsigned int hooknum,
                                return ret;
                        }
                } else
-                       DEBUGP("Already setup manip %s for ct %p\n",
-                              maniptype == IP_NAT_MANIP_SRC ? "SRC" : "DST",
-                              ct);
+                       pr_debug("Already setup manip %s for ct %p\n",
+                                maniptype == IP_NAT_MANIP_SRC ? "SRC" : "DST",
+                                ct);
                break;
 
        default:
@@ -270,7 +264,7 @@ nf_nat_adjust(unsigned int hooknum,
 
        ct = nf_ct_get(*pskb, &ctinfo);
        if (ct && test_bit(IPS_SEQ_ADJUST_BIT, &ct->status)) {
-               DEBUGP("nf_nat_standalone: adjusting sequence number\n");
+               pr_debug("nf_nat_standalone: adjusting sequence number\n");
                if (!nf_nat_seq_adjust(pskb, ct, ctinfo))
                        return NF_DROP;
        }
@@ -334,7 +328,7 @@ static int __init nf_nat_standalone_init(void)
 {
        int ret = 0;
 
-       need_conntrack();
+       need_ipv4_conntrack();
 
 #ifdef CONFIG_XFRM
        BUG_ON(ip_nat_decode_session != NULL);
@@ -350,7 +344,6 @@ static int __init nf_nat_standalone_init(void)
                printk("nf_nat_init: can't register hooks.\n");
                goto cleanup_rule_init;
        }
-       nf_nat_module_is_loaded = 1;
        return ret;
 
  cleanup_rule_init:
@@ -367,7 +360,6 @@ static void __exit nf_nat_standalone_fini(void)
 {
        nf_unregister_hooks(nf_nat_ops, ARRAY_SIZE(nf_nat_ops));
        nf_nat_rule_cleanup();
-       nf_nat_module_is_loaded = 0;
 #ifdef CONFIG_XFRM
        ip_nat_decode_session = NULL;
        synchronize_net();