>>      for background (like when this happens) see previous articles
>>      on this thread.
>>      current behavior: return 0-length sockaddr.
>Yeah, that is totally broken.
>Hmm.. how long has this been the "current behavior" ?
>ISTR at one time you would instead get the actual sockaddr of the
>just-closed socket, rather than a bogus sockaddr... and that is the
>behavior one would expect.

        No, i guess your memory is wrong (or remember something different).

        Before sys/kern/uipc_socket.c 1.52, 4.4BSD-based systems hanged up when:
        - TCP handshake is done
        - RST is issued before accept(2)

        after 1.52 to current, zero-length sockaddr is returned.

        none of these are correct.

>>      new behavior: return ECONNABORTED.
>>      SUSv2 suggests this behavior.  it is much safer as accept(2) will fail
>>      so almost every application will go to error case (if you don't have
>>      error check in userland appication, that's problem in application).
>Why does SUSv2 suggest this when so many applications would break?
>And they work fine doing the old behavior (returning a real sockaddr)?

        again, *BSD never worked right (in terms of SUSv2 definition of
        "right").  see Stevens "unix network programming" section I
        mentioned earlier in this thread.

itojun


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message

Reply via email to