Takashi Hibi <hibi665@xxxxxxx> wrote on 03/31/2004 05:01:29 AM:
> Isn't it related to the patch (usagi-users 02627)?
> If the socket is bound to non-multicast address, it can't receive multicast packets.
Oh, duh! I missed in the mail where it says it's bound to the
It was a bug in earlier code to deliver multicast packets
based on whether a join had been done on the socket and your
application was apparently relying on that bug.
Group membership is per-interface and joining a group
on a socket only determines whether multicasts for that group
will be delivered to the local machine on that interface.
Whether a multicast packet for a (interface,group) pair
that has been joined is delivered to a particular
socket or not depends on how the socket is bound (only*-- just
like unicasts). Sockets bound to the group address or the
unspecified address (inaddr_any) will be delivered. All others
don't pass UDP bind matching and won't be delivered (and that's
Your application should either bind to the (single)
multicast address you're interested in or to the unspecified
address if you want to receive from multiple groups. The latter
will receive packets for ALL groups (even ones you didn't join,
but another process did) and unicasts if those packets are sent
with the same protocol (ie, UDP) and have matching port(s).
* an exception is multicast source filters, which can prevent a
packet from being delivered that otherwise passes these tests.