aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2021-10-20 02:33:02 +0000
committerCy Schubert <cy@FreeBSD.org>2021-12-09 18:50:22 +0000
commit2d120650d3d8d79a9ae8ef7fb5deba99015a11cf (patch)
tree368752be94ddbac2510820093069032b4630c899
parent7e63bbe7d6876781d39711f8cb75863bc0892ea4 (diff)
downloadsrc-2d120650d3d8d79a9ae8ef7fb5deba99015a11cf.tar.gz
src-2d120650d3d8d79a9ae8ef7fb5deba99015a11cf.zip
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)
-rw-r--r--sys/contrib/ipfilter/netinet/ip_ftp_pxy.c6
1 files 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);