ipv6: use IS_ENABLED()
#if defined(CONFIG_FOO) || defined(CONFIG_FOO_MODULE) can be replaced by #if IS_ENABLED(CONFIG_FOO) Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Cong Wang <amwang@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
cc535dfb6a
commit
07a936260a
@@ -50,7 +50,7 @@
|
||||
#include <net/udp.h>
|
||||
#include <net/inet_common.h>
|
||||
#include <net/tcp_states.h>
|
||||
#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE)
|
||||
#if IS_ENABLED(CONFIG_IPV6_MIP6)
|
||||
#include <net/mip6.h>
|
||||
#endif
|
||||
#include <linux/mroute6.h>
|
||||
@@ -123,7 +123,7 @@ static int icmpv6_filter(const struct sock *sk, const struct sk_buff *skb)
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE)
|
||||
#if IS_ENABLED(CONFIG_IPV6_MIP6)
|
||||
typedef int mh_filter_t(struct sock *sock, struct sk_buff *skb);
|
||||
|
||||
static mh_filter_t __rcu *mh_filter __read_mostly;
|
||||
@@ -184,7 +184,7 @@ static bool ipv6_raw_deliver(struct sk_buff *skb, int nexthdr)
|
||||
filtered = icmpv6_filter(sk, skb);
|
||||
break;
|
||||
|
||||
#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE)
|
||||
#if IS_ENABLED(CONFIG_IPV6_MIP6)
|
||||
case IPPROTO_MH:
|
||||
{
|
||||
/* XXX: To validate MH only once for each packet,
|
||||
|
Reference in New Issue
Block a user