Re: ssh X forwarding fails with Linux VPS (Virtual Server)



"Richard E. Silverman" <res@xxxxxxxx> wrote in
news:m2k6ay471d.fsf@xxxxxxxxxxxxxxxxxx:
>>> [admin@vm07 ~]$ strace xterm [...] connect(3, {sa_family=AF_INET,
>>> sin_port=htons(6010), sin_addr=inet_addr("NNN.NN.NNN.NNN")}, 16) =
>>> -1 EINVAL (Invalid argument) close(3) = 0 [...]
>>>

"DT" == Darren Tucker <dtucker@xxxxxxxxxxxxxxxx> writes:
DT> If you look a little further, EINVAL is not one of the documented
DT> return codes (at least on my FC4 box). There's a reference to it
DT> in existing in SysVr4 but not what might cause it on Linux.

The way I read it, the call returns -1 on any failure; the fact that
EINVAL is -1 is a red herring. You'd need to get the value of errno for
the real error code, which of course we don't see in strace.


Actually EINVAL is 22 (not -1) and is the value from errno which strace
conveniently translated into symbolic form for you. As Darren notes, the
man page does not list a possible EINVAL return from connect, but I would
guess that it means the sockaddr you passed in was malformed somehow.

Chris Dodd
cdodd@xxxxxxx
.



Relevant Pages