From nobody Wed Jan 12 21:05:21 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id ED0961946279; Wed, 12 Jan 2022 21:05:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JZ0Sx36YLz4ZBr; Wed, 12 Jan 2022 21:05:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2303A13E71; Wed, 12 Jan 2022 21:05:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20CL5LbL080076; Wed, 12 Jan 2022 21:05:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20CL5LVm080075; Wed, 12 Jan 2022 21:05:21 GMT (envelope-from git) Date: Wed, 12 Jan 2022 21:05:21 GMT Message-Id: <202201122105.20CL5LVm080075@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 2a6465245fa3 - main - ipfilter: Fix IP header checksums post ftp proxy List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2a6465245fa3f5323c2036049a730e2f2b95d270 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642021521; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DsWTXJ0fAbeJZhjz+//L9QUvkfu2Fw8aIsqqID0foRw=; b=L+ElXQ30t9zU73OcevOUQ0NhGlLYUYiSWBJOpTa5YPml/OOIdMZtSBJMITH/Nlh1B9Hx0g 4cguz27+iiO+5ZYiwOEIfhJ8W1forOCuxaCf8JzdBvcsLpp2e3fWptsAdZTsWHj/cEpKtc 0qi3TfNfcbrMNTTUD4h2ISzUaAlkPqSxuP/wYSBTTyOsipLifMUsUzGYWSfTUd2T4RW2Ym HPXt+pEVAvCDwxtJlfzGoFpDa4mBRTK9xMp5tIu+MocRJmVVBimcy7zP8hLlzEeJOZeiuL vBBkeapY1+zk+MS5VTxCLZrZu1Mlh22xjSQVpEC2IcfiRYmFs/4OrrY1QWwhBQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642021521; a=rsa-sha256; cv=none; b=AblQ6fEAa5BsX98FXZgNzrdLW1qj6NT526Ce7miJzRk1oF9ArKmG7BJYKaBHyt28ealz9f yPraNof0CIEjI5RgLekwi/2rSddSbPiFC6cQl7PM+hRo2k45YfHv3m5eOD/TRTnPTAH5rL 53ENhHkGpC9YGfXzc+m748QM8HsYJrR+ESdB1rI0upXImJUVfWxe2gfSFjh3b8iwxU5hLB b1aDF3JUllDlTEzVndz5XpTDr70JSJt4iz4j+oC8nW2CYrEtjmYhfRLwh45gYxPUc22qjG GHZxzVNGYfECrDSP90CiDVoe31otrgWjLII380PgmDnZYL3fgaV1sSBSpdDltA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=2a6465245fa3f5323c2036049a730e2f2b95d270 commit 2a6465245fa3f5323c2036049a730e2f2b95d270 Author: Cy Schubert AuthorDate: 2022-01-12 20:55:11 +0000 Commit: Cy Schubert CommitDate: 2022-01-12 20:58:05 +0000 ipfilter: Fix IP header checksums post ftp proxy Don't assume checksums will be calculated later in fastforward. MFC after: 1 week --- sys/netpfil/ipfilter/netinet/ip_proxy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/ipfilter/netinet/ip_proxy.c b/sys/netpfil/ipfilter/netinet/ip_proxy.c index 7b185a9202db..3ee88af26886 100644 --- a/sys/netpfil/ipfilter/netinet/ip_proxy.c +++ b/sys/netpfil/ipfilter/netinet/ip_proxy.c @@ -884,7 +884,7 @@ ipf_proxy_check(fr_info_t *fin, nat_t *nat) ip_t *ip; short rv; int err; -#if !defined(_KERNEL) || SOLARIS +#if !defined(_KERNEL) || SOLARIS || defined(__FreeBSD__) u_32_t s1, s2, sd; #endif @@ -976,7 +976,7 @@ ipf_proxy_check(fr_info_t *fin, nat_t *nat) * packet. */ adjlen = APR_INC(err); -#if !defined(_KERNEL) || SOLARIS +#if !defined(_KERNEL) || SOLARIS || defined(__FreeBSD__) s1 = LONG_SUM(fin->fin_plen - adjlen); s2 = LONG_SUM(fin->fin_plen); CALC_SUMD(s1, s2, sd);