Skip to content

Commit

Permalink
[NETFILTER]: ipt_TTL: fix checksum update bug
Browse files Browse the repository at this point in the history
Fix regression introduced by the incremental checksum patches.

Signed-off-by: Patrick McHardy <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
kaber authored and David S. Miller committed Sep 22, 2006
1 parent 5251e2d commit ca39df6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/ipv4/netfilter/ipt_TTL.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit ca39df6

Please sign in to comment.