diff options
author | Christian Brueffer <brueffer@FreeBSD.org> | 2015-07-14 09:25:10 +0000 |
---|---|---|
committer | Christian Brueffer <brueffer@FreeBSD.org> | 2015-07-14 09:25:10 +0000 |
commit | b4a355e2f38bc0f9e91cc22207bc63714e832fa2 (patch) | |
tree | c0b9c6bc3c1b2ec2ab541c11a943906127729d48 /sbin | |
parent | df7b11fa099cb87ee64c8c3bec8befe4bd14a967 (diff) | |
download | src-b4a355e2f38bc0f9e91cc22207bc63714e832fa2.tar.gz src-b4a355e2f38bc0f9e91cc22207bc63714e832fa2.zip |
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
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=285529
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/ggate/ggated/ggated.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/ggate/ggated/ggated.c b/sbin/ggate/ggated/ggated.c index 01aa00aca645..a340f01b1b5f 100644 --- a/sbin/ggate/ggated/ggated.c +++ b/sbin/ggate/ggated/ggated.c @@ -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) { |