Evgeniy Polyakov wrote: > On Mon, Aug 08, 2005 at 11:52:08AM +0200, Patrick McHardy ([EMAIL PROTECTED]) > wrote: > >>Yes, but this is not the problem. There is no user of netlink_broadcast >>which sends to multiple groups. The problem is that binding to groups >>is possible before a kernel socket exists, so we don't know the >>number of groups. I would prefer to avoid reallocation of the group >>mask. > > Hmm, could you please explain more precisely? > If I understood you correctly, you care about the case, when > userspace is bound to socket S and group G, > but kernel side does not have this socket and/or this group, > and when it is created, it does not know, if such group G exist. > So on creation time you want to specify those group G to be included > into groupset for socket S. > But how does it differ from the case, when socket already exists > and userspace tries to bind to some new group, which is not in the > groupset for socket S?
No, let my try again. I want netlink protocol implementations to be able to specify the number of multicast groups they need, probably at netlink_kernel_create time. Userspace sockets belonging to such a protocol need to have their groups mask (in struct netlink_sock) sized so there's a bit for each group, but they can do binding to groups (which needs the allocated groups mask) before the kernel socket is created, and thus before we know how many groups there will be. If we forbid creating a socket for a netlink family before a kernel socket is created there can be no userspace-implemented protocols using multicasting anymore (netlink protocols without a kernel part on top of netlink). Right now there are none, so this won't cause any trouble, the question is if we want to retain the possibility or just don't care about this case. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html