lkml.org 
[lkml]   [1998]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: 2.0.36-pre9
    On Tue, Sep 15, 1998 at 03:10:21PM +0200, Florian La Roche wrote:

    > > > Strange that nobody else has noticed, but "sys_bind" seems to be broken.
    > > > It does return "0" for an already used socket.

    > > Arghhh.. I bet thats what broke rlogin.

    > It might be good to further check the kernel. Even though the kernel
    > did just return 0 instead of the error code, the kernel did send out
    > data to the network.
    > (The kernel used a high (>1024) port number and that's why the other
    > end didn't accept the rlogin-connection. More precise: not more than one
    > rlogin connection was possible as port 1023 was already used then...)
    >
    > Isn't it a fault if a program can send out data, if the bind() syscall
    > failed? (I won't look into this as I just hope for the goodness in my
    > apps.... :-)

    Actually, to the application, the bind() call did not fail. It merely
    returned 0, which is a valid file descriptor. Rlogin continued execution
    normally, except it was trying to connect with a rather odd socket.

    As for which port number to connect from, that logic should be in rlogin,
    not in the kernel. And indeed it is. If the bind() call fails, rlogin tries
    a different one, and rlogin itself determines wether that'll be one higher
    or lower. In this case, however, rlogin didn't know the bind() had failed
    in the first place :)

    Regards,
    Thomas.

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:44    [W:0.023 / U:0.016 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site