]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[NETFILTER]: ipt_TTL: fix checksum update bug
authorPatrick McHardy <kaber@trash.net>
Wed, 20 Sep 2006 19:01:34 +0000 (12:01 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Fri, 22 Sep 2006 22:19:54 +0000 (15:19 -0700)
Fix regression introduced by the incremental checksum patches.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/netfilter/ipt_TTL.c

index 214d9d9c428f90b452daa42f48782a7264f8273e..96e79cc6d0f233dd20cb95b4ffc76336a72d2a7d 100644 (file)
@@ -54,8 +54,8 @@ ipt_ttl_target(struct sk_buff **pskb,
        }
 
        if (new_ttl != iph->ttl) {
-               iph->check = nf_csum_update((iph->ttl << 8) ^ 0xFFFF,
-                                           new_ttl << 8,
+               iph->check = nf_csum_update(ntohs((iph->ttl << 8)) ^ 0xFFFF,
+                                           ntohs(new_ttl << 8),
                                            iph->check);
                iph->ttl = new_ttl;
        }