[stunnel-users] stunnel closing connections with RST ?

Michal Trojnara Michal.Trojnara at mobi-com.net
Wed Feb 8 08:58:19 CET 2006


sergei wrote:

> SSL_accept: Peer suddenly disconnected

That's it.  The client that was connecting stunnel did not negotiate SSL,
but closed the connection instead.  Stunnel sent RST packet to let its peers
know about this problem.

In your case BIG-IP incorrectly assumed TCP RST on an established connection
indicates a server problem.  It is an obvious bug in BIG-IP software.

Here is the workaround for you:

*** client.c.orig       2006-02-08 08:53:02.000782136 +0100
--- client.c    2006-02-08 08:53:12.000737865 +0100
***************
*** 1041,1053 ****
  }

  static void reset(int fd, char *txt) {
-     /* Set lingering on a socket if needed*/
-     struct linger l;
-
-     l.l_onoff=1;
-     l.l_linger=0;
-     if(setsockopt(fd, SOL_SOCKET, SO_LINGER, (void *)&l, sizeof(l)))
-         log_error(LOG_DEBUG, get_last_socket_error(), txt);
  }

  /* End of client.c */
--- 1041,1046 ----

Best regards,
    Mike




More information about the stunnel-users mailing list