Browse Source

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)
tags/ggatessh-v1.0.0
brueffer 9 years ago
parent
commit
68e6f4213c
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      ggated/ggated.c

+ 1
- 1
ggated/ggated.c View File

@@ -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) {


Loading…
Cancel
Save