]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/netfilter/nf_nat_rule.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6
[linux-2.6-omap-h63xx.git] / net / ipv4 / netfilter / nf_nat_rule.c
index 7f95b4e2eb313f9e46bd1ade33689df03dcfa537..2534f718ab9286ae49693f1c1a78e16b3ea5241d 100644 (file)
@@ -56,8 +56,8 @@ static struct
                /* PRE_ROUTING */
                {
                        .entry = {
-                               .target_offset = sizeof(struct ipt_entry),
-                               .next_offset = sizeof(struct ipt_standard),
+                               .target_offset = sizeof(struct ipt_entry),
+                               .next_offset = sizeof(struct ipt_standard),
                        },
                        .target = {
                                .target = {
@@ -71,8 +71,8 @@ static struct
                /* POST_ROUTING */
                {
                        .entry = {
-                               .target_offset = sizeof(struct ipt_entry),
-                               .next_offset = sizeof(struct ipt_standard),
+                               .target_offset = sizeof(struct ipt_entry),
+                               .next_offset = sizeof(struct ipt_standard),
                        },
                        .target = {
                                .target = {
@@ -86,8 +86,8 @@ static struct
                /* LOCAL_OUT */
                {
                        .entry = {
-                               .target_offset = sizeof(struct ipt_entry),
-                               .next_offset = sizeof(struct ipt_standard),
+                               .target_offset = sizeof(struct ipt_entry),
+                               .next_offset = sizeof(struct ipt_standard),
                        },
                        .target = {
                                .target = {
@@ -145,7 +145,7 @@ static unsigned int ipt_snat_target(struct sk_buff **pskb,
 
        /* Connection must be valid and new. */
        NF_CT_ASSERT(ct && (ctinfo == IP_CT_NEW || ctinfo == IP_CT_RELATED ||
-                           ctinfo == IP_CT_RELATED + IP_CT_IS_REPLY));
+                           ctinfo == IP_CT_RELATED + IP_CT_IS_REPLY));
        NF_CT_ASSERT(out);
 
        return nf_nat_setup_info(ct, &mr->range[0], hooknum);
@@ -191,7 +191,7 @@ static unsigned int ipt_dnat_target(struct sk_buff **pskb,
 
        if (hooknum == NF_IP_LOCAL_OUT &&
            mr->range[0].flags & IP_NAT_RANGE_MAP_IPS)
-               warn_if_extra_mangle((*pskb)->nh.iph->daddr,
+               warn_if_extra_mangle(ip_hdr(*pskb)->daddr,
                                     mr->range[0].min_ip);
 
        return nf_nat_setup_info(ct, &mr->range[0], hooknum);
@@ -226,10 +226,6 @@ static int ipt_dnat_checkentry(const char *tablename,
                printk("DNAT: multiple ranges no longer supported\n");
                return 0;
        }
-       if (mr->range[0].flags & IP_NAT_RANGE_PROTO_RANDOM) {
-               printk("DNAT: port randomization not supported\n");
-               return 0;
-       }
        return 1;
 }
 
@@ -256,8 +252,8 @@ alloc_null_binding(struct nf_conn *ct,
 
 unsigned int
 alloc_null_binding_confirmed(struct nf_conn *ct,
-                             struct nf_nat_info *info,
-                             unsigned int hooknum)
+                            struct nf_nat_info *info,
+                            unsigned int hooknum)
 {
        __be32 ip
                = (HOOK2MANIP(hooknum) == IP_NAT_MANIP_SRC