Re: SO_REUSEADDR setsockopt() and SCTP

From: Randall Stewart <rrs@cisco.com>
Date: Fri Feb 11 2005 - 17:50:50 EST
('binary' encoding is not supported, stored as-is) ('binary' encoding is not supported, stored as-is) Anatoly:

I know for KAME-BSD you would also get a failure. We don't
support the concept of SO_REUSADDR. Namely because:

a) There is no timed wait with an SCTP endpoint. Thus
    you don't necessarily need this to reopen a socket.

and

b) The one-to-many model allows you to peel things off
    if you want to push associations out to other threads.

The sockets API draft does not cover it.. and so it is
really implementation dependant.. I don't know why one
would want it...

R

Anatoly Khusid wrote:
> This question deals more with "SCTP Sockets API" draft. I have not seen any
> explanation in this document regarding the usage of SO_REUSEADDR on SCTP
> sockets.
> The following code fails on Solaris 10:
>
>
> ADDR = Some valid address to bind
> fd1 = socket(PF_INET, SOCK_STREAM, IPPROTO_SCTP);
> setsockopt(fd1, SOL_SOCKET, SO_REUSEADDR)
> bind(fd1, ADDR)
> fd2 = socket(PF_INET, SOCK_STREAM, IPPROTO_SCTP);
> setsockopt(fd2, SOL_SOCKET, SO_REUSEADDR)
> bind(fd2, ADDR) <=== Fails with errno="Address in use"
>
>
> However, the above code works fine on Linux SLES9. Does it mean that Linux
> has a bug, or this is something implementation dependent?
> What is the right behavior for SO_REUSEADDR on SCTP sockets?
> Do you think this should be explained/documented in "SCTP Sockets API"?
>
> Thanks,
>
> Anatoly Khusid
>

-- 
Randall Stewart
ITD
803-345-0369 <or> 815-342-5222
Received on Fri Feb 11 17:54:02 2005

This archive was generated by hypermail 2.1.8 : Mon Mar 13 2006 - 15:22:24 EST