<html>
  <head>
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-15">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt><b>In the latest versions of stunnel including stunnel-4.54b8,
        activating the option for transparent destination with
        transparent=destination fails.<br>
        <br>
        The following error is found in the log with this configuration
        (tested on CentOS 6.2 and 6.3):<br>
        INTERNAL ERROR: No target for remote socket<br>
        <br>
        This bug seems to be introduced with version 4.51 by rewriting
        the code and introducing additional sanity checks for the
        configuration.<br>
        <br>
        The following patch seems to resolve the problem:<br>
        <br>
        --- src/client.c.~1~    2012-03-05 12:11:06.000000000 +0100<br>
        +++ src/client.c    2012-08-27 00:29:36.000000000 +0200<br>
        @@ -303,7 +303,7 @@<br>
                 c->bind_addr=NULL; /* don't bind */<br>
         <br>
             /* setup c->remote_fd, now */<br>
        -    if(c->opt->option.remote) { /* try remote first for
        exec+connect targets */<br>
        +    if(c->opt->option.remote ||
        c->opt->option.transparent_dst) { /* try remote first for
        exec+connect targets */<br>
                 c->remote_fd.fd=connect_remote(c);<br>
             } else if(c->opt->option.program) { /* exec+connect
        uses local fd */<br>
                 c->remote_fd.fd=connect_local(c);<br>
        <br>
      </b></tt>
  </body>
</html>