Hi!

I crosspost it in hope that somebody may shed some light on what happens
here.

Being behind a firewall, I tried to build SOCKSified cvs client. The
first simple attempt (just including socks.h and defining SOCKS)
compiled without any problems - but aborted with "protocol error". After
some investigation it turned out to be the following:

by default CVS on Unix tries to use standard file io instead of socket
io when speaking to server (this is controlled by NO_SOCKET_TO_FD
variable). That is, after opening connection to server it dup()'s socket
(to get in/out channels), fdopen()'s them and is usinf stdio package to
read/write. This for some reason greatly confuses SOCKS or may be OS.
E.g. (seen with debugger) SOCKS tries to get SO_TYPE of output fd, gets
1 == UDP!!! even if original socket was of course TCP socket.

Recompiling with NO_SOCKET_TO_FD works (as far as I can tell).

BTW I applied dup() patch for SOCKS5 library with the same result.

My question is - is it known problem? What is more probable - OS bug or
some problems in SOCKS?

Configuration details: system mips-sni-sysv4 (ReliantUNIX-N 5.44C30 with
up to date patches), cvs-1.10.8, socks5-1.0r10, both configured with
standard congiuration (just ./configure). Of course, cvs was a bit
modified as described above (include socks.h at the end of cvs.h and
add -DSOCKS -DNO_SOCKET_TO_FD to compilation flags).

I tried this with socks5-1.0r9 with the same result. So, it seems to be
either inherent problems in SOCKS5 library or my OS bug.

BTW anybody else interested in SOCKSified cvs?

regards

-andrej

Have a nice DOS!
B >>

Reply via email to