aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/mld.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/mld.h')
-rw-r--r--include/net/mld.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/net/mld.h b/include/net/mld.h
index faa1d161bf24..01d751303498 100644
--- a/include/net/mld.h
+++ b/include/net/mld.h
@@ -88,12 +88,15 @@ struct mld2_query {
88#define MLDV2_QQIC_EXP(value) (((value) >> 4) & 0x07) 88#define MLDV2_QQIC_EXP(value) (((value) >> 4) & 0x07)
89#define MLDV2_QQIC_MAN(value) ((value) & 0x0f) 89#define MLDV2_QQIC_MAN(value) ((value) & 0x0f)
90 90
91#define MLD_EXP_MIN_LIMIT 32768UL
92#define MLDV1_MRD_MAX_COMPAT (MLD_EXP_MIN_LIMIT - 1)
93
91static inline unsigned long mldv2_mrc(const struct mld2_query *mlh2) 94static inline unsigned long mldv2_mrc(const struct mld2_query *mlh2)
92{ 95{
93 /* RFC3810, 5.1.3. Maximum Response Code */ 96 /* RFC3810, 5.1.3. Maximum Response Code */
94 unsigned long ret, mc_mrc = ntohs(mlh2->mld2q_mrc); 97 unsigned long ret, mc_mrc = ntohs(mlh2->mld2q_mrc);
95 98
96 if (mc_mrc < 32768) { 99 if (mc_mrc < MLD_EXP_MIN_LIMIT) {
97 ret = mc_mrc; 100 ret = mc_mrc;
98 } else { 101 } else {
99 unsigned long mc_man, mc_exp; 102 unsigned long mc_man, mc_exp;