Re: Why does sending multicast UDP require a gateway?

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

 



On 2011-03-30, Andrew Lunn <andrew@xxxxxxx> wrote:
>> It's being sent via a socket that's bound to a specific interface, so
>> I wouldn't think that would be a problem.
>
> Ah, O.K. 
>
> Maybe try it anyway?
>
>> I can see that if you're sending from an unbound socket, you might
>> want a way to specify which interface to use for sending multicast
>> packets.  But without such a route, the only thing that makes sense to
>> me is "send it out all of them".
>
> And on a multi homed machine that might result in the group receiving
> two copies of the packet when both multicast routers pick it up and
> send to the RP.

True.

According to RFC1112, you only send a multicast packet on one
interface. If the application doesn't specify an interface, a default
interface is used.  IOW, discarding the packet is not correct:

   Second, for hosts that may be attached to more than one network,
   the service interface should provide a way for the upper-layer
   protocol to identify which network interface is be used for the
   multicast transmission.  Only one interface is used for the initial
   transmission; multicast routers are responsible for forwarding to
   any other networks, if necessary.  If the upper-layer protocol
   chooses not to identify an outgoing interface, a default interface
   should be used, preferably under the control of system management.

It turns out this was fixed in the FreeBSD sources in 2001:
   
  http://svn.freebsd.org/viewvc/base?view=revision&revision=79830   
  http://svn.freebsd.org/viewvc/base?view=revision&revision=79836

I'll work up a patch...
  
-- 
Grant Edwards               grant.b.edwards        Yow! I'm having an
                                  at               emotional outburst!!
                              gmail.com            


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



[Index of Archives]     [Linux Embedded]     [U-Boot V2]     [Linux Kernel]     [Linux MIPS]     [Linux ARM]     [Linux for the Blind]     [Yosemite]     [ISDN Cause Codes]     [eCos Home]

  Powered by Linux