summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorNicolas Dichtel <nicolas.dichtel@6wind.com>2013-01-21 06:00:25 +0000
committerDavid S. Miller <davem@davemloft.net>2013-01-21 13:55:14 -0500
commitbbb923a4c2d17ebd5ec34755fe19a33914cbd86f (patch)
treef9e3f172e6d157bafa94c3722b4427f90c9c241e /include/linux
parent202dc3fc599c1dded235d3b448d9ca924252e354 (diff)
downloadtalos-op-linux-bbb923a4c2d17ebd5ec34755fe19a33914cbd86f.tar.gz
talos-op-linux-bbb923a4c2d17ebd5ec34755fe19a33914cbd86f.zip
mcast: define and use MRT[6]_MAX in ip[6]_mroute_opt()
This will ease further addition of new MRT[6]_* values and avoid to update in6.h each time. Note that we reduce the maximum value from 210 to 209, but 210 does not match any known value in ip[6]_mroute_setsockopt(). Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Acked-by: David L Stevens <dlstevens@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mroute.h2
-rw-r--r--include/linux/mroute6.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/mroute.h b/include/linux/mroute.h
index ea00d9162ee5..79aaa9fc1a15 100644
--- a/include/linux/mroute.h
+++ b/include/linux/mroute.h
@@ -9,7 +9,7 @@
#ifdef CONFIG_IP_MROUTE
static inline int ip_mroute_opt(int opt)
{
- return (opt >= MRT_BASE) && (opt <= MRT_BASE + 10);
+ return (opt >= MRT_BASE) && (opt <= MRT_MAX);
}
#else
static inline int ip_mroute_opt(int opt)
diff --git a/include/linux/mroute6.h b/include/linux/mroute6.h
index a223561ba12e..66982e764051 100644
--- a/include/linux/mroute6.h
+++ b/include/linux/mroute6.h
@@ -10,7 +10,7 @@
#ifdef CONFIG_IPV6_MROUTE
static inline int ip6_mroute_opt(int opt)
{
- return (opt >= MRT6_BASE) && (opt <= MRT6_BASE + 10);
+ return (opt >= MRT6_BASE) && (opt <= MRT6_MAX);
}
#else
static inline int ip6_mroute_opt(int opt)
OpenPOWER on IntegriCloud