Date: Tue, 21 Jul 2015 14:27:37 +0000 (UTC) From: Christian Brueffer <brueffer@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r285749 - stable/10/sbin/ggate/ggated Message-ID: <201507211427.t6LERb4d089738@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: brueffer Date: Tue Jul 21 14:27:36 2015 New Revision: 285749 URL: https://svnweb.freebsd.org/changeset/base/285749 Log: MFC: r285529 If ggated's exports_find() fails, the connection is removed before (trying to) report the problem to the client. sendfail() is called with an already closed socket and thus it fails to inform the client about the problem. Fix this by calling sendfail() before connection_remove(). PR: 195944 Submitted by: Fabian Keil Reviewed by: pjd Approved by: re (gjb) Modified: stable/10/sbin/ggate/ggated/ggated.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ggate/ggated/ggated.c ============================================================================== --- stable/10/sbin/ggate/ggated/ggated.c Tue Jul 21 14:25:21 2015 (r285748) +++ stable/10/sbin/ggate/ggated/ggated.c Tue Jul 21 14:27:36 2015 (r285749) @@ -906,8 +906,8 @@ handshake(struct sockaddr *from, int sfd ex = exports_find(from, &cinit, conn); if (ex == NULL) { - connection_remove(conn); sendfail(sfd, errno, NULL); + connection_remove(conn); return (0); } if (conn->c_mediasize == 0) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507211427.t6LERb4d089738>