]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
xt_TEE: use ip_send_check instead of open-coded logic
authorJan Engelhardt <jengelh@medozas.de>
Mon, 22 Mar 2010 22:29:20 +0000 (23:29 +0100)
committerJan Engelhardt <jengelh@medozas.de>
Sun, 4 Apr 2010 22:46:12 +0000 (00:46 +0200)
extensions/xt_TEE.c

index ce25663255de8cb572290216987751cf6a356b3d..ad90cfe1180406b819e9f530120163a0a4a27c41 100644 (file)
@@ -166,11 +166,8 @@ tee_tg4(struct sk_buff **pskb, const struct xt_target_param *par)
         * If we are in INPUT, the checksum must be recalculated since
         * the length could have changed as a result of defragmentation.
         */
-       if (par->hooknum == NF_INET_LOCAL_IN) {
-               struct iphdr *iph = ip_hdr(skb);
-               iph->check = 0;
-               iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl);
-       }
+       if (par->hooknum == NF_INET_LOCAL_IN)
+               ip_send_check(ip_hdr(skb));
 
        /*
         * Copy the skb, and route the copy. Will later return %XT_CONTINUE for