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:52:11 +0000
commit116c7f0358297e3c8cc55bb1d0061e369c28d42d (patch)
treea4120e19253ffccfc33a03b3bb66748dc4040ccc
parent97625bb40ed6acc0e65bad4bcebe62b70d18d154 (diff)
downloadsrc-116c7f0358297e3c8cc55bb1d0061e369c28d42d.tar.gz
src-116c7f0358297e3c8cc55bb1d0061e369c28d42d.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);