Subject: [tsvwg] Doubt regarding the behavior of bind( ) as per RFC 6458

From: nagesh <[email-masked]>
Date: Tue, 14 Aug 2012 20:42:15 +0530

Hi,

                I have a doubt regarding what should be the behavior of the
SCTP stack for bind( ) operation as explained in the RFC 6458 section 4.1.2

                What RFC mentions is, if the IP address part of addr is
specified as wildcard (IN6ADDR_ANY_INIT), operating system will associate
the endpoint with an optimal address set of the available interfaces. 

                Can anybody provide more insight on "optimal address set",
since this point is not clear in the RFC.

Thanks and Regards,

Nagesh.

4.1.2.  bind()

...

If the IP address part of addr is specified as a wildcard (INADDR_ANY
   for an IPv4 address, or as IN6ADDR_ANY_INIT or in6addr_any for an
   IPv6 address), the operating system will associate the endpoint with
   an optimal address set of the available interfaces.  If the IPv4
   sin_port or IPv6 sin6_port is set to 0, the operating system will
   choose an ephemeral port for the endpoint.

---

From: Michael Tuexen <[email-masked]>
Date: Wed, 15 Aug 2012 15:27:37 +0200

On Aug 14, 2012, at 5:12 PM, nagesh wrote:

> Hi,
>                 I have a doubt regarding what should be the behavior of the SCTP stack for bind( ) operation as explained in the RFC 6458 section 4.1.2
>  
>                 What RFC mentions is, if the IP address part of addr is specified as wildcard (IN6ADDR_ANY_INIT), operating system will associate the endpoint with an optimal address set of the available interfaces.
>                 Can anybody provide more insight on “optimal address set”, since this point is not clear in the RFC.
Hi,

let me give you one example, what FreeBSD does. If you bind a listening socket an the host has private and public
addresses, it will
* respond to a received INIT chunk from a public address with an INIT-ACK chunk containing only public addresses.
* respond to a received INIT chunk from a private address with an INIT-ACK chunk containing the public and private addresses.
* respond to a received INIT chunk from a loopback address with an INIT-ACK chunk containing the public, private and loopback addresses.

So some sort of scoping is done. We had two IDs on this (one for IPv4 and one for IPv6), but
they are expired...

Best regards
Michael
> …….