[972] in linux-net channel archive

home help back first fref pref prev next nref lref last post

Re: telnet/ftp/rlogin/rsh not working between Linux machines. (fwd)

daemon@ATHENA.MIT.EDU (Olaf Titz)
Wed Aug 23 20:13:54 1995

To: submit-linux-dev-net@ratatosk.yggdrasil.com
From: Olaf Titz <olaf@blackforest.inka.de>
Date: 22 Aug 1995 09:54:42 GMT

Matthias Urlichs <urlichs@smurf.noris.de> wrote:
> Besides, accepting and then immediately throwing away a connection is
> against quite a few RFCs. SMTP, FTP, NNTP, I can probably dig out a few
> others.  :-/  Unless you configure tcpd to reject callers correctly,
> IMHO you shouldn't use it in the first place.

"Rejecting callers correctly" in this sense simply can't be done with
the socket interface as defined by Sun/BSD quite some years ago...
After you've done the accept() call, the connection is already up.
But before the accept(), even with its non-blocking variant, you
can't do getpeername(), since you don't have a connected socket, which
only comes up as the result of accept().

This seems to be one of the bigger shortcomings of this (rotten
anyway, IMHO) programming inteface. Or am I completely wrong here? Is
getpeername() possible on a listening socket? No (af_inet.c,
function inet_getname).

olaf

-- 
___        Olaf.Titz@inka.de or @{stud,informatik}.uni-karlsruhe.de       ____
__ o           <URL:http://www.inka.de/~bigred/>     <IRC:praetorius>
__/<_              >> Just as long as the wheels keep on turning round
_)>(_)______________ I will live for the groove 'til the sun goes down << ____

home help back first fref pref prev next nref lref last post