summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid L Stevens <dlstevens@us.ibm.com>2006-11-25 02:51:50 +0100
committerAdrian Bunk <bunk@stusta.de>2006-11-25 02:51:50 +0100
commit679d6ff3da25290c736f80feae9f4a75af9bf8fb (patch)
tree30d6b268bb252e46160e747f49a09f122b833abd
parent28bb4422588c130715fc0a39b32a366d29bb2f1b (diff)
[IGMP]: Fix IGMPV3_EXP() normalization bit shift value.
The IGMPV3_EXP() macro doesn't correctly shift the normalization bit, so time-out values are longer than they should be. Thanks to Dirk Ooms for finding the problem in IGMPv3 - MLDv2 had a similar problem that was already fixed a year ago. :-( Signed-off-by: David L Stevens <dlstevens@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Adrian Bunk <bunk@stusta.de>
-rw-r--r--include/linux/igmp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/igmp.h b/include/linux/igmp.h
index 28f4f3b36950..c8bccd003b61 100644
--- a/include/linux/igmp.h
+++ b/include/linux/igmp.h
@@ -191,7 +191,7 @@ struct ip_mc_list
#define IGMPV3_MASK(value, nb) ((nb)>=32 ? (value) : ((1<<(nb))-1) & (value))
#define IGMPV3_EXP(thresh, nbmant, nbexp, value) \
((value) < (thresh) ? (value) : \
- ((IGMPV3_MASK(value, nbmant) | (1<<(nbmant+nbexp))) << \
+ ((IGMPV3_MASK(value, nbmant) | (1<<(nbmant))) << \
(IGMPV3_MASK((value) >> (nbmant), nbexp) + (nbexp))))
#define IGMPV3_QQIC(value) IGMPV3_EXP(0x80, 4, 3, value)