Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5913
b: refs/heads/master
c: f93592f
h: refs/heads/master
i:
  5911: 6578bee
v: v3
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Aug 21, 2005
1 parent 22c54fa commit 6c718bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fd841326d73096ad79be9c3fa348f9ad04541cc2
refs/heads/master: f93592ff4fa4a55aa7640d435fa93338e190294d
9 changes: 5 additions & 4 deletions trunk/net/ipv4/netfilter/ipt_ECN.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ set_ect_tcp(struct sk_buff **pskb, const struct ipt_ECN_info *einfo, int inward)
return 0;
tcph = (void *)(*pskb)->nh.iph + (*pskb)->nh.iph->ihl*4;

if ((*pskb)->ip_summed == CHECKSUM_HW &&
skb_checksum_help(*pskb, inward))
return 0;

diffs[0] = ((u_int16_t *)tcph)[6];
if (einfo->operation & IPT_ECN_OP_SET_ECE)
tcph->ece = einfo->proto.tcp.ece;
Expand All @@ -79,13 +83,10 @@ set_ect_tcp(struct sk_buff **pskb, const struct ipt_ECN_info *einfo, int inward)
diffs[1] = ((u_int16_t *)tcph)[6];
diffs[0] = diffs[0] ^ 0xFFFF;

if ((*pskb)->ip_summed != CHECKSUM_HW)
if ((*pskb)->ip_summed != CHECKSUM_UNNECESSARY)
tcph->check = csum_fold(csum_partial((char *)diffs,
sizeof(diffs),
tcph->check^0xFFFF));
else
if (skb_checksum_help(*pskb, inward))
return 0;
(*pskb)->nfcache |= NFC_ALTERED;
return 1;
}
Expand Down

0 comments on commit 6c718bc

Please sign in to comment.