Date: Mon, 25 Jul 2011 15:14:04 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r224326 - stable/8/contrib/pf/ftp-proxy Message-ID: <201107251514.p6PFE466062459@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bz Date: Mon Jul 25 15:14:03 2011 New Revision: 224326 URL: http://svn.freebsd.org/changeset/base/224326 Log: Flush output buffers before closing TCP session. Fixes the case where the proxy would eat the 221 response coming from the server towards the client. This is a commit as HEAD got the change with the entire pf45 import. PR: bin/154469 Obtained from: OpenBSD r1.18 MFC after: 2 weeks Modified: stable/8/contrib/pf/ftp-proxy/ftp-proxy.c Modified: stable/8/contrib/pf/ftp-proxy/ftp-proxy.c ============================================================================== --- stable/8/contrib/pf/ftp-proxy/ftp-proxy.c Mon Jul 25 15:10:53 2011 (r224325) +++ stable/8/contrib/pf/ftp-proxy/ftp-proxy.c Mon Jul 25 15:14:03 2011 (r224326) @@ -273,6 +273,12 @@ end_session(struct session *s) logmsg(LOG_INFO, "#%d ending session", s->id); + /* Flush output buffers. */ + if (s->client_bufev && s->client_fd != -1) + evbuffer_write(s->client_bufev->output, s->client_fd); + if (s->server_bufev && s->server_fd != -1) + evbuffer_write(s->server_bufev->output, s->server_fd); + if (s->client_fd != -1) close(s->client_fd); if (s->server_fd != -1)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201107251514.p6PFE466062459>