Re: kernel module to list sockets with their multicast group joins andrespective processes
From: David Stevens
Date: Mon Jul 16 2007 - 16:18:56 EST
> sockets that join different groups receive messages from the respective
> other group (if they are only bound to the wildcard address). Obviously
> this is handled differently in Linux for IPv4, where the socket matching
> for incoming message is done solely on the 4-tuple of addresses and
ports,
> and IPv6, where the explicit socket joins are taken into account [1,2].
These are not different in v4 vs v6. Group membership is
per-interface,
delivery depends on the binding (for both v4 and v6), and this is the same
as BSD behavior since IP multicasting was invented.
There are two levels of checks, and I think you're confusing them.
inet6_mc_check() is checking that somebody (*anybody*) has joined the
group on the receiving interface, before delivering the packet to IP.
Delivery to a particular socket depends on source filter settings, if
they are in use, and bindings (only). The socket has a list of joined
addresses to track source filters and to check for correct join/leave
(a socket can't leave a group it hasn't joined), but that list does not
determine delivery of a multicast packet to the socket when source
filtering
is not in use.
+-DLS
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/