Skip to contentSkip to conversation

: Fix adjustment of number of multicast groups

GENETLINK Applied Thomas Graf 2 participants 2 messages Jul 24, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

The current calculation of the maximum number of genetlink multicast groups seems odd, fix it.

net/netlink/genetlink.c +1 -1
Index: net-2.6/net/netlink/genetlink.c
===================================================================
@@ -184,7 +184,7 @@ int genl_register_mc_group(struct genl_f
 	}
 
 	err = netlink_change_ngroups(genl_sock,
-				     sizeof(unsigned long) * NETLINK_GENERIC);
+				     mc_groups_longs * BITS_PER_LONG);
 	if (err)
 		goto out;