summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorbrueffer <brueffer@FreeBSD.org>2015-07-21 14:27:36 +0000
committerbrueffer <brueffer@FreeBSD.org>2015-07-21 14:27:36 +0000
commitdbae220f096177759ed45c8e9566b50f3fcdfe80 (patch)
tree14076cae34dbf90ac16cf0053edc5325a930e369 /sbin
parent77896922f6d2552355c5dd628cb8caf2715e0bc7 (diff)
downloadFreeBSD-src-dbae220f096177759ed45c8e9566b50f3fcdfe80.zip
FreeBSD-src-dbae220f096177759ed45c8e9566b50f3fcdfe80.tar.gz
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)
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ggate/ggated/ggated.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/ggate/ggated/ggated.c b/sbin/ggate/ggated/ggated.c
index 01aa00a..a340f01 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) {
OpenPOWER on IntegriCloud