aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2005-01-01 17:40:33 -0800
committerLinus Torvalds <torvalds@evo.osdl.org>2005-01-01 17:40:33 -0800
commita89d6351ac41939f106826e5ae4f8035646078b4 (patch)
tree32a8da5120a218201797f8a95ee30ad1801f0c75 /net
parent2e20fb912502903364394dc861574b995e0a95f6 (diff)
downloadhistory-a89d6351ac41939f106826e5ae4f8035646078b4.tar.gz
[PATCH] ipt_ECN corrupt checksum fix
Nasty bug, caught while writing the ECN target test. Corrupts checksums of packets when target is used on them. Let this be a warning on the evils of casts. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/netfilter/ipt_ECN.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/netfilter/ipt_ECN.c b/net/ipv4/netfilter/ipt_ECN.c
index f659ec3c927830..e54bf34d37b028 100644
--- a/net/ipv4/netfilter/ipt_ECN.c
+++ b/net/ipv4/netfilter/ipt_ECN.c
@@ -67,7 +67,7 @@ set_ect_tcp(struct sk_buff **pskb, const struct ipt_ECN_info *einfo, int inward)
if (einfo->operation & IPT_ECN_OP_SET_CWR)
th->cwr = einfo->proto.tcp.cwr;
- diffs[1] = ((u_int16_t *)&th)[6];
+ diffs[1] = ((u_int16_t *)th)[6];
/* Only mangle if it's changed. */
if (diffs[0] != diffs[1]) {