git: 2d120650d3d8 - stable/13 - ipfilter: Correct a comment and add notation
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 09 Dec 2021 18:59:01 UTC
The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=2d120650d3d8d79a9ae8ef7fb5deba99015a11cf commit 2d120650d3d8d79a9ae8ef7fb5deba99015a11cf Author: Cy Schubert <cy@FreeBSD.org> AuthorDate: 2021-10-20 02:33:02 +0000 Commit: Cy Schubert <cy@FreeBSD.org> CommitDate: 2021-12-09 18:50:22 +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);