From nobody Thu Dec 09 19:00:23 2021 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 DA4E318C883D; Thu, 9 Dec 2021 19:00:24 +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 4J93JR5xk8z4TkK; Thu, 9 Dec 2021 19:00:23 +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 25EF14257; Thu, 9 Dec 2021 19:00:23 +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 1B9J0NEj055908; Thu, 9 Dec 2021 19:00:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B9J0NvE055907; Thu, 9 Dec 2021 19:00:23 GMT (envelope-from git) Date: Thu, 9 Dec 2021 19:00:23 GMT Message-Id: <202112091900.1B9J0NvE055907@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: 116c7f035829 - stable/12 - ipfilter: Correct a comment and add notation 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/stable/12 X-Git-Reftype: branch X-Git-Commit: 116c7f0358297e3c8cc55bb1d0061e369c28d42d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639076424; 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=ubiTEEVhMnSW+egRam+FoQVGSYzT6XJpWZ2DF8uDWwA=; b=w2xQ6dwCkfNiR8ZP5Rlckj1+b8RpGKIO9M4TSNTtg0ltc9XODnbilqi6I1bJYBxQNqCqi5 Qok4or7tWed+r+dt8THapFLSLgw6uuF/Y3TTvMqKaByWsC4aTbg429yHGqRJ8e9oqCA/0C V5C62GpC2pOgDcRo+rdnCMzpTO5mMW8+C7LcsqwNPGa8FtUIa0dCCCKfIQ+DBVzEez0+9E U+amBlGJtUyt9evVUOtEghCuyuQEFimTk1dNJUMtIM1KRxvejob3ba3wanDw0KtVkKT3T3 GvEwO7rse9WTWQjxM5PLPxD5bH0ZNqDNtXaO8wcoSgOdRB7aQEMLtJy+ir/H2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639076424; a=rsa-sha256; cv=none; b=TZ1jY8gcXfTp+MiDLUa2ZS0Th0ilyTETwl46jC6eLK9i6KaU29OG3Y9kqqrPNDqXIvmQ4s KRsACaN7wwh/kmr8GWfqeLUFgrol5YCuu9UAU/TTDZqDYXQyQJsglP5OPCN5HdqJTHFuOh ZromN8K2cJrMd5Rf6IkD1Txk/EV2NSRWzHB9DnLHvgCiS8hknDVEmAzix5iI6TqqlpUB7l M514rvhdeOKFZfkmZ+D3kp2zXPTH++LyvGXG2pcurb5UOvG2Hsd3HG9cTWcjjXpaXBavsy 9Nnl4KhlIK58zTyqdr06h19t/SocNFqKkWlrO3UlyMg8zr0TQdcjdSYA7lmfkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=116c7f0358297e3c8cc55bb1d0061e369c28d42d commit 116c7f0358297e3c8cc55bb1d0061e369c28d42d Author: Cy Schubert AuthorDate: 2021-10-20 02:33:02 +0000 Commit: Cy Schubert CommitDate: 2021-12-09 18:52:11 +0000 ipfilter: Correct a comment and add notation Correct a comment to accurately reflect what is being done. While we're at it document the next step in the process. (cherry picked from commit 1ca73c39a54750a4a2f584efd7c57f453bf7dbbe) --- sys/contrib/ipfilter/netinet/ip_ftp_pxy.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c b/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c index 4ac7ffc7e5b1..a495292687d9 100644 --- a/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c +++ b/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c @@ -516,8 +516,7 @@ ipf_p_ftp_addport(softf, fin, ip, nat, ftp, dlen, nport, inc) #endif /* - * Add skeleton NAT entry for connection which will come back the - * other way. + * If an existing entry already exists, use it instead. */ #ifdef USE_INET6 if (nat->nat_v[0] == 6) { @@ -550,6 +549,9 @@ ipf_p_ftp_addport(softf, fin, ip, nat, ftp, dlen, nport, inc) if (nat2 != NULL) return APR_INC(inc); + /* + * An existing entry doesn't exist. Let's make one. + */ ipn = ipf_proxy_rule_rev(nat); if (ipn == NULL) return APR_ERR(1);