Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[sfrench/cifs-2.6.git] / net / sched / act_nat.c
index 24e614c495f26091d5acdc8af3a8f951d8d984c2..d0386a413e8dc9406d470e66af196efc40f4e226 100644 (file)
@@ -218,6 +218,7 @@ static int tcf_nat(struct sk_buff *skb, struct tc_action *a,
                if (!pskb_may_pull(skb, ihl + sizeof(*icmph) + sizeof(*iph)))
                        goto drop;
 
+               icmph = (void *)(skb_network_header(skb) + ihl);
                iph = (void *)(icmph + 1);
                if (egress)
                        addr = iph->daddr;
@@ -246,7 +247,7 @@ static int tcf_nat(struct sk_buff *skb, struct tc_action *a,
                        iph->saddr = new_addr;
 
                inet_proto_csum_replace4(&icmph->checksum, skb, addr, new_addr,
-                                        1);
+                                        0);
                break;
        }
        default: