netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* multicasting netlink messages to groups > 31 from userspace
@ 2007-07-03 19:51 Johannes Berg
  2007-07-04 12:04 ` Evgeniy Polyakov
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Johannes Berg @ 2007-07-03 19:51 UTC (permalink / raw)
  To: netdev; +Cc: jamal, Patrick McHardy, Thomas Graf

[-- Attachment #1: Type: text/plain, Size: 1098 bytes --]

Hey,

Looking through the code that uses NL_NONROOT_SEND I just realised that
it's impossible to send multicast messages from userspace to multicast
groups with IDs higher than 31. That's not really good given that
everywhere else we handle multicast groups up to 2^32-1 :/

Unfortunately, I haven't found any good way to fix this; in fact the
only way to fix it backward-compatibly I could come up with so far is to
extend struct sockaddr_nl by "__u32 nl_group;" and use that in
netlink_sendmsg instead of nl_groups when msg_namelen is large enough
and I'm not even sure that checking msg_namelen is enough, apps could
give you a length much longer than the actual structure... Maybe
additionally require that nl_groups is set to ~0 or something. The same
should be done for netlink_connect() then.

It would of course be possible to add a new sockopt
NETLINK_{SET,GET}_DST_GROUP, but that prevents you from sending messages
to multiple high groups with sendmsg(), and I think having a working
sendmsg() is desirable as well.

Does anybody have any better ideas?

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2007-07-06 15:08 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-03 19:51 multicasting netlink messages to groups > 31 from userspace Johannes Berg
2007-07-04 12:04 ` Evgeniy Polyakov
2007-07-04 13:54   ` Johannes Berg
2007-07-04 14:12 ` Patrick McHardy
2007-07-04 14:18   ` Johannes Berg
2007-07-04 14:30     ` Patrick McHardy
2007-07-04 14:38       ` Johannes Berg
2007-07-04 14:48         ` Patrick McHardy
2007-07-04 14:56           ` Johannes Berg
2007-07-04 15:00             ` Patrick McHardy
2007-07-04 15:08               ` Johannes Berg
2007-07-05 13:37                 ` Patrick McHardy
2007-07-06 10:53                   ` Johannes Berg
2007-07-06 15:08                     ` jamal
2007-07-05 13:53 ` jamal
2007-07-05 14:08   ` Patrick McHardy
2007-07-06 10:50   ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).