Package: tsocks
Version: 1.8beta5-9.1
Severity: important
There is a bug in tsocks wrapper of the poll(2) system call which
prevents tsocks from working with apps that use poll(2) to wait for data
on the socket. As a consequence, the connections initiated by the
application never come up and, finally, time out. This has been observed
with subversion/stable and with java applications (with the sun-jvm).
I could fix the bug - at least it works now for all applications that I
use together with tsocks. (That is, it at least works with mutt,
subversion, ssh.) The fix is contained in the attached patch.
-- System Information:
Debian Release: 5.0.4
APT prefers oldstable
APT policy: (500, 'oldstable'), (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.26-2-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.ISO-8859-1, LC_CTYPE=en_US.ISO-8859-1 (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash
Versions of packages tsocks depends on:
ii libc6 2.7-18lenny2 GNU C Library: Shared libraries
tsocks recommends no packages.
tsocks suggests no packages.
-- no debconf information
--- tsocks-1.8-old/tsocks.c 2010-04-02 18:18:48.000000000 +0000
+++ tsocks-1.8/tsocks.c 2010-02-11 09:01:58.000000000 +0000
@@ -663,6 +663,9 @@
setevents |= POLLOUT;
nevents++;
}
+ /* Also, if the connection is DONE, we have to restore the events
+ * in ufds[]. In the next loop we won't touch that socket again. */
+ ufds[i].events = conn->selectevents;
}
}
} while (nevents == 0);