fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / net / ipv4 / netfilter / ipt_REDIRECT.c
index f290463..462eceb 100644 (file)
@@ -1,6 +1,6 @@
 /* Redirect.  Simple mapping which alters dst to a local IP address. */
 /* (C) 1999-2001 Paul `Rusty' Russell
- * (C) 2002-2004 Netfilter Core Team <coreteam@netfilter.org>
+ * (C) 2002-2006 Netfilter Core Team <coreteam@netfilter.org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
 #include <net/protocol.h>
 #include <net/checksum.h>
 #include <linux/netfilter_ipv4.h>
+#ifdef CONFIG_NF_NAT_NEEDED
+#include <net/netfilter/nf_nat_rule.h>
+#else
 #include <linux/netfilter_ipv4/ip_nat_rule.h>
+#endif
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Netfilter Core Team <coreteam@netfilter.org>");
@@ -36,7 +40,6 @@ redirect_check(const char *tablename,
               const void *e,
               const struct xt_target *target,
               void *targinfo,
-              unsigned int targinfosize,
               unsigned int hook_mask)
 {
        const struct ip_nat_multi_range_compat *mr = targinfo;
@@ -58,12 +61,11 @@ redirect_target(struct sk_buff **pskb,
                const struct net_device *out,
                unsigned int hooknum,
                const struct xt_target *target,
-               const void *targinfo,
-               void *userinfo)
+               const void *targinfo)
 {
        struct ip_conntrack *ct;
        enum ip_conntrack_info ctinfo;
-       u_int32_t newdst;
+       __be32 newdst;
        const struct ip_nat_multi_range_compat *mr = targinfo;
        struct ip_nat_range newrange;