fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / net / ipv4 / netfilter / ip_nat_amanda.c
index da1f412..85df1a9 100644 (file)
@@ -56,10 +56,8 @@ static unsigned int help(struct sk_buff **pskb,
                        break;
        }
 
-       if (port == 0) {
-               ip_conntrack_expect_free(exp);
+       if (port == 0)
                return NF_DROP;
-       }
 
        sprintf(buffer, "%u", port);
        ret = ip_nat_mangle_udp_packet(pskb, exp->master, ctinfo,
@@ -70,19 +68,18 @@ static unsigned int help(struct sk_buff **pskb,
        return ret;
 }
 
-static void __exit fini(void)
+static void __exit ip_nat_amanda_fini(void)
 {
-       ip_nat_amanda_hook = NULL;
-       /* Make sure noone calls it, meanwhile. */
-       synchronize_net();
+       rcu_assign_pointer(ip_nat_amanda_hook, NULL);
+       synchronize_rcu();
 }
 
-static int __init init(void)
+static int __init ip_nat_amanda_init(void)
 {
-       BUG_ON(ip_nat_amanda_hook);
-       ip_nat_amanda_hook = help;
+       BUG_ON(rcu_dereference(ip_nat_amanda_hook));
+       rcu_assign_pointer(ip_nat_amanda_hook, help);
        return 0;
 }
 
-module_init(init);
-module_exit(fini);
+module_init(ip_nat_amanda_init);
+module_exit(ip_nat_amanda_fini);