xt_TEE: do rechecksumming in PREROUTING too

This commit is contained in:
Jan Engelhardt
2010-03-22 23:16:51 +01:00
parent 56535551b3
commit 346fc1a376
2 changed files with 5 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
HEAD
====
- TEE: do rechecksumming in PREROUTING too
Xtables-addons 1.24 (March 17 2010)

View File

@@ -163,10 +163,11 @@ tee_tg4(struct sk_buff **pskb, const struct xt_target_param *par)
skb = *pskb;
/*
* If we are in INPUT, the checksum must be recalculated since
* the length could have changed as a result of defragmentation.
* If we are in PREROUTING/INPUT, the checksum must be recalculated
* since the length could have changed as a result of defragmentation.
*/
if (par->hooknum == NF_INET_LOCAL_IN)
if (par->hooknum == NF_INET_PRE_ROUTING ||
par->hooknum == NF_INET_LOCAL_IN)
ip_send_check(ip_hdr(skb));
/*