From: Jan Engelhardt Date: Thu, 9 Oct 2025 23:27:15 +0000 (+0200) Subject: tarpit: replace broken checksum testing X-Git-Tag: v3.30~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52fed790430808c5aab2106d1bddb3f6b51b4d86;p=thirdparty%2Fxtables-addons.git tarpit: replace broken checksum testing Packets never validated. --- diff --git a/extensions/xt_TARPIT.c b/extensions/xt_TARPIT.c index 650cdf9..294814e 100644 --- a/extensions/xt_TARPIT.c +++ b/extensions/xt_TARPIT.c @@ -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; }