From nobody Wed Jan 19 14:21:27 2022 X-Original-To: dev-commits-src-branches@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 5228B196F858; Wed, 19 Jan 2022 14:21:29 +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 4Jf79h2vdbz3Mcb; Wed, 19 Jan 2022 14:21:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642602089; 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=exRt5uBNWrE0IKXBugh/DOOJy6wpZb1igqTbuLpZrow=; b=KuGOxj07oC2npD1zVNWSLNcYA7xE0niPGm7KAxPh5zw0SsPYSfndtZzYIfYFl1QAajPcz7 aUjiTdMBc6ihjnIrCna0kueyqX+8DoTF1xX7cuZoLVdHu7tJcOUmAqaJSnepHwSTFykJ6A /v0y+67+laH5vSbJziBA7JlqGY+KGUsy6HPh/sCnU31Q493uNA+mgyIwWyGtKkLA5NLhav d2QUQLD+hz7KHqR+5MqieCad6vS3XsSgMuRwg7WNIPMhfOKWQbdQs4exZ5jtqv3dr+WIwU c8XvqQZMRfTHwhOCX6lcHjGsogp+dAQ3Pw01iyLuHoBUqvWH1xdphlYueFsQIA== 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 B8D4A168C4; Wed, 19 Jan 2022 14:21:27 +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 20JELRbk007155; Wed, 19 Jan 2022 14:21:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20JELRxU007154; Wed, 19 Jan 2022 14:21:27 GMT (envelope-from git) Date: Wed, 19 Jan 2022 14:21:27 GMT Message-Id: <202201191421.20JELRxU007154@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: d9bb426ca008 - stable/13 - ipfilter: Fix IP header checksums post ftp proxy List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: d9bb426ca0088e17c58d8287dd35de7f4f9d71c4 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642602089; 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=exRt5uBNWrE0IKXBugh/DOOJy6wpZb1igqTbuLpZrow=; b=FzJDJeh/pEvyVEdPvCk5B0vqd3MGHUKdqwRioZt5bWcemkls0j/qMXLkH6k9gT2iccLOHJ qFtmwsC5LXAD4GU4Erq5sWW8chSFwVAKJ5Z9eDTRTlEFpzHXSrxtATGsaYHyuq84G+GDl+ F1NWmctf/FLGRwktH5+SiaemQLSkXiMaYiyOHD9ZtZHCi5yfH8aLGgeqdmeNeWpFJ7RJGW RNLeONnhbePv3wp7yvkX9Y/kjodLTtWZPBxsys9oqyCtlbGL0iSWtgff/nNF6Q3yR7oLW2 bJS+AhVWLtP1D0OaehL8ZEZhm7MkGdCh3A1x7Wal1m5+1aSHVgg6kXbCllPAUw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642602089; a=rsa-sha256; cv=none; b=UBXgxr7uNFMX5squZ1msGc3S+gWze07O/zBsG8VdRPBPzOTqkePDBTaz0OAPTHyMgI3sYA u7chumXiYEG4mc0zl2xztG3FwxEzRzDx/tE8AcUxu6JRea/GpsUlU4vIq9hvNRZ39xyxQB Lck+Tde6xBpGU5QpEhFSD13PL1umS9UU5EP/0wcfKRGsd38QpVgp84Aa4oXqAeDLJg5HfE o+PUkcKo7rDB3ceDptrmQ6zcUY+FiffRdAIvpX7gNzwyZgLMRZxF/MvAPI97owFb5lxGYR Q5cSRD13RzPkrf7lOtdBNaInUVcFnexecgSkQ4wWtSex6BJFaSKdGRU8HhZ36w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=d9bb426ca0088e17c58d8287dd35de7f4f9d71c4 commit d9bb426ca0088e17c58d8287dd35de7f4f9d71c4 Author: Cy Schubert AuthorDate: 2022-01-12 20:55:11 +0000 Commit: Cy Schubert CommitDate: 2022-01-19 14:19:24 +0000 ipfilter: Fix IP header checksums post ftp proxy Don't assume checksums will be calculated later in fastforward. (cherry picked from commit 2a6465245fa3f5323c2036049a730e2f2b95d270) --- sys/contrib/ipfilter/netinet/ip_proxy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/contrib/ipfilter/netinet/ip_proxy.c b/sys/contrib/ipfilter/netinet/ip_proxy.c index af5ed81a5765..52991723b25b 100644 --- a/sys/contrib/ipfilter/netinet/ip_proxy.c +++ b/sys/contrib/ipfilter/netinet/ip_proxy.c @@ -914,7 +914,7 @@ ipf_proxy_check(fin, 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 @@ -1006,7 +1006,7 @@ ipf_proxy_check(fin, 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);