[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <49E64C67.90201@hp.com>
Date: Wed, 15 Apr 2009 17:06:47 -0400
From: Vlad Yasevich <vladislav.yasevich@...com>
To: Christoph Lameter <cl@...ux.com>
CC: Neil Horman <nhorman@...driver.com>, netdev@...r.kernel.org,
David Miller <davem@...emloft.net>,
David Stevens <dlstevens@...ibm.com>
Subject: Re: [PATCH] Multicast: Avoid useless duplication of multicast messages
Christoph Lameter wrote:
> On Wed, 15 Apr 2009, Vlad Yasevich wrote:
>
>> Looking at BSD, which was the root of the original brokeness, they have it fixed.
>> The code will skip sockets that are not members of a particular group. So, we
>> are trying really hard to stay bug-for-bug compatible with old implementations.
>
> Ahh interesting. David: Could you say something on this?
Just digging around some more, it appears that OpenSolaris also filters out
non-joined groups at the socket:
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/inet/ip/ip_multi.c#ilg_lookup_ill_withsrc
In that code, connp is essentially a socket and ilg is the membership list.
That function function called from conn_wantpacket(), which is in turn called
for every socket that matches the packet.
>
>> What's worse is that if you have a socket that doesn't care about any mulicast
>> destinations (never did an ADD_MEMBERSHIP), it will still get multicast traffic if
>> it bound to that port.
>>
>> We need to take into account the socket's multicast group list.
>
> Right. The fix is pretty simple too since the infrastructure has been
> there since the IGMPv3 updates.
>
Right. since IGMPv3 introduced the concept of filtering. It even states this
in RFC 3376:
Filtering of packets based upon a socket's multicast reception
state is a new feature of this service interface. The previous
service interface [RFC1112] described no filtering based upon
multicast join state; rather, a join on a socket simply caused the
host to join a group on the given interface, and packets destined
for that group could be delivered to all sockets whether they had
joined or not.
-vlad
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists