]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
tarpit: replace broken checksum testing
authorJan Engelhardt <jengelh@inai.de>
Thu, 9 Oct 2025 23:27:15 +0000 (01:27 +0200)
committerJan Engelhardt <jengelh@inai.de>
Thu, 9 Oct 2025 23:29:32 +0000 (01:29 +0200)
Packets never validated.

extensions/xt_TARPIT.c

index 650cdf9398f5fcbb9fd98e420e0808516ad9b098..294814e17c33058ab7d63fcb24706f01ebed38cc 100644 (file)
@@ -341,8 +341,7 @@ static void tarpit_tcp6(const struct xt_action_param *par,
        }
 
        /* Check checksum. */
-       if (csum_ipv6_magic(&oip6h->saddr, &oip6h->daddr, otcplen, IPPROTO_TCP,
-           skb_checksum(oldskb, tcphoff, otcplen, 0))) {
+       if (nf_ip6_checksum(oldskb, xt_hooknum(par), tcphoff, IPPROTO_TCP)) {
                pr_debug("TCP checksum is invalid\n");
                return;
        }