tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bind() to IPv6 link-local multicast group gives EADDRNOTAVAIL



On Jul 23,  7:31pm, rhansen%bbn.com@localhost (Richard Hansen) wrote:
-- Subject: Re: bind() to IPv6 link-local multicast group gives EADDRNOTAVAIL

| Thanks for the patch.  I'll try it out in a bit, but before I do I have
| some questions.  Some of these will be answered by my testing, but I
| wanted to ask them anyway in case you already know the answer and would
| like to update the patch:
| 
|   * With this patch, in6_pcbind_addr() will set in6p->in6p_laddr to the
|     multicast group address.  Will this cause an outgoing packet sent
|     via the socket to have the source address set to the multicast
|     address (which would violate RFC4291)?
| 
|   * Shouldn't in6_pcbind_addr() ensure that sin6->sin6_scope_id is
|     non-0 if the multicast address is link-local?  (or perhaps
|     non-global?)
| 
|   * How does sin6->sin6_scope_id affect the binding?  Suppose I have two
|     interfaces, wm0 and wm1.  I create two sockets and bind one to
|     ff02::101%wm0 port 123 and the other to ff02:101%wm1 port 123.
|     Each should only receive packets that arrive on the specified
|     interface, but with this patch I'm guessing one of the following
|     will happen:
|       - the second bind() will fail (the call to in6_pcblookup_port()
|         in in6_pcbbind_port() doesn't consider sin6_scope_id, so I
|         think NetBSD will return EADDRINUSE)
|       - both sockets will receive packets destined to either interface
|       - one socket will receive packets destined to both interfaces
|         while the other socket receives nothing
| 
|   * Should in6_pcbind_addr() reject the bind to the multicast address
|     if the socket type is SOCK_STREAM?

Yes, these are all good points; I will think about it more and send an
updated patch.

christos


Home | Main Index | Thread Index | Old Index