]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
Multicast computation off by one
authorjamal <hadi@cyberus.ca>
Wed, 6 Dec 2006 17:06:03 +0000 (12:06 -0500)
committerStephen Hemminger <shemminger@osdl.org>
Wed, 6 Dec 2006 19:31:13 +0000 (11:31 -0800)
A small typo fixup
BTW, how do you like the subject to look like?

cheers,
jamal

[GENL] Multicast computation off by one

When using the first 32 groups, the multicast group to bit mapping
was off by one.

Signed-off-by: Jamal Hadi Salim
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
genl/genl_utils.h

index 2f2314b190be3dc9d3d8d6a19ad3ef464c021521..22e9210f607ee3bbf7c6d7c88ff21d854473b891 100644 (file)
@@ -16,7 +16,7 @@ extern int genl_ctrl_resolve_family(const char *family);
 /* seems to have dissapeared from netlink.h */
 static inline __u32 nl_mgrp(__u32 group)
 {
-       return group ? 1 << group : 0;
+       return group ? (1 << (group -1)) : 0;
 }
 
 #endif