Skip to content

Commit

Permalink
Issue #158: Attempt to address the reported EINVAL error, in the RF…
Browse files Browse the repository at this point in the history
…C1918

fallback case, by using the session pool's longer lifetime.
  • Loading branch information
Castaglia committed May 25, 2020
1 parent 32660d6 commit 710d78f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mod_proxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -2760,7 +2760,7 @@ MODRET proxy_eprt(cmd_rec *cmd, struct proxy_session *proxy_sess) {
const char *rfc1918_ipstr;

rfc1918_ipstr = pr_netaddr_get_ipstr(remote_addr);
remote_addr = pr_netaddr_dup(cmd->tmp_pool, session.c->remote_addr);
remote_addr = pr_netaddr_dup(session.pool, session.c->remote_addr);
(void) pr_log_writefile(proxy_logfd, MOD_PROXY_VERSION,
"client sent RFC1918 address '%s' in EPRT command, ignoring it and "
"using '%s'", rfc1918_ipstr, pr_netaddr_get_ipstr(remote_addr));
Expand Down Expand Up @@ -3190,7 +3190,7 @@ MODRET proxy_port(cmd_rec *cmd, struct proxy_session *proxy_sess) {
const char *rfc1918_ipstr;

rfc1918_ipstr = pr_netaddr_get_ipstr(remote_addr);
remote_addr = pr_netaddr_dup(cmd->tmp_pool, session.c->remote_addr);
remote_addr = pr_netaddr_dup(session.pool, session.c->remote_addr);
(void) pr_log_writefile(proxy_logfd, MOD_PROXY_VERSION,
"client sent RFC1918 address '%s' in PORT command, ignoring it and "
"using '%s'", rfc1918_ipstr, pr_netaddr_get_ipstr(remote_addr));
Expand Down

0 comments on commit 710d78f

Please sign in to comment.