From: Patrick McHardy Date: Wed, 20 Sep 2006 19:01:34 +0000 (-0700) Subject: [NETFILTER]: ipt_TTL: fix checksum update bug X-Git-Tag: v3.12-rc1~34044^2~36 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ca39df6cdfbe2ea210e31117f5d469576cfe9008;p=kernel%2Fkernel-generic.git [NETFILTER]: ipt_TTL: fix checksum update bug Fix regression introduced by the incremental checksum patches. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- diff --git a/net/ipv4/netfilter/ipt_TTL.c b/net/ipv4/netfilter/ipt_TTL.c index 214d9d9..96e79cc 100644 --- a/net/ipv4/netfilter/ipt_TTL.c +++ b/net/ipv4/netfilter/ipt_TTL.c @@ -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; }