Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / net / ipv6 / netfilter / ip6_tables.c
index c9d6b23..2e72f89 100644 (file)
  */
 
 #include <linux/capability.h>
+#include <linux/config.h>
 #include <linux/in.h>
 #include <linux/skbuff.h>
 #include <linux/kmod.h>
 #include <linux/vmalloc.h>
 #include <linux/netdevice.h>
 #include <linux/module.h>
-#include <linux/poison.h>
 #include <linux/icmpv6.h>
 #include <net/ipv6.h>
 #include <asm/uaccess.h>
@@ -377,7 +377,7 @@ ip6t_do_table(struct sk_buff **pskb,
        } while (!hotdrop);
 
 #ifdef CONFIG_NETFILTER_DEBUG
-       ((struct ip6t_entry *)table_base)->comefrom = NETFILTER_LINK_POISON;
+       ((struct ip6t_entry *)table_base)->comefrom = 0xdead57ac;
 #endif
        read_unlock_bh(&table->lock);
 
@@ -1281,8 +1281,7 @@ int ip6t_register_table(struct xt_table *table,
                return ret;
        }
 
-       ret = xt_register_table(table, &bootstrap, newinfo);
-       if (ret != 0) {
+       if (xt_register_table(table, &bootstrap, newinfo) != 0) {
                xt_free_table_info(newinfo);
                return ret;
        }
@@ -1398,39 +1397,23 @@ static int __init ip6_tables_init(void)
 {
        int ret;
 
-       ret = xt_proto_init(AF_INET6);
-       if (ret < 0)
-               goto err1;
+       xt_proto_init(AF_INET6);
 
        /* Noone else will be downing sem now, so we won't sleep */
-       ret = xt_register_target(&ip6t_standard_target);
-       if (ret < 0)
-               goto err2;
-       ret = xt_register_target(&ip6t_error_target);
-       if (ret < 0)
-               goto err3;
-       ret = xt_register_match(&icmp6_matchstruct);
-       if (ret < 0)
-               goto err4;
+       xt_register_target(&ip6t_standard_target);
+       xt_register_target(&ip6t_error_target);
+       xt_register_match(&icmp6_matchstruct);
 
        /* Register setsockopt */
        ret = nf_register_sockopt(&ip6t_sockopts);
-       if (ret < 0)
-               goto err5;
+       if (ret < 0) {
+               duprintf("Unable to register sockopts.\n");
+               xt_proto_fini(AF_INET6);
+               return ret;
+       }
 
        printk("ip6_tables: (C) 2000-2006 Netfilter Core Team\n");
        return 0;
-
-err5:
-       xt_unregister_match(&icmp6_matchstruct);
-err4:
-       xt_unregister_target(&ip6t_error_target);
-err3:
-       xt_unregister_target(&ip6t_standard_target);
-err2:
-       xt_proto_fini(AF_INET6);
-err1:
-       return ret;
 }
 
 static void __exit ip6_tables_fini(void)