Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Feb 2012 09:01:03 +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-7@freebsd.org
Subject:   svn commit: r231259 - stable/7/contrib/pf/ftp-proxy
Message-ID:  <201202090901.q19913Mm090900@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bz
Date: Thu Feb  9 09:01:03 2012
New Revision: 231259
URL: http://svn.freebsd.org/changeset/base/231259

Log:
  MF8 r224326:
  
   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.
  
   Obtained from:	OpenBSD r1.18
  PR:		bin/154469

Modified:
  stable/7/contrib/pf/ftp-proxy/ftp-proxy.c
Directory Properties:
  stable/7/contrib/pf/   (props changed)

Modified: stable/7/contrib/pf/ftp-proxy/ftp-proxy.c
==============================================================================
--- stable/7/contrib/pf/ftp-proxy/ftp-proxy.c	Thu Feb  9 08:41:56 2012	(r231258)
+++ stable/7/contrib/pf/ftp-proxy/ftp-proxy.c	Thu Feb  9 09:01:03 2012	(r231259)
@@ -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?201202090901.q19913Mm090900>