net: use IS_ENABLED(CONFIG_IPV6)
Instead of testing defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
1ded132d4c
commit
dfd56b8b38
@ -353,14 +353,14 @@ static inline void ip_ipgre_mc_map(__be32 naddr, const unsigned char *broadcast,
|
||||
memcpy(buf, &naddr, sizeof(naddr));
|
||||
}
|
||||
|
||||
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
#include <linux/ipv6.h>
|
||||
#endif
|
||||
|
||||
static __inline__ void inet_reset_saddr(struct sock *sk)
|
||||
{
|
||||
inet_sk(sk)->inet_rcv_saddr = inet_sk(sk)->inet_saddr = 0;
|
||||
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
if (sk->sk_family == PF_INET6) {
|
||||
struct ipv6_pinfo *np = inet6_sk(sk);
|
||||
|
||||
@ -379,7 +379,7 @@ static inline int sk_mc_loop(struct sock *sk)
|
||||
switch (sk->sk_family) {
|
||||
case AF_INET:
|
||||
return inet_sk(sk)->mc_loop;
|
||||
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
case AF_INET6:
|
||||
return inet6_sk(sk)->mc_loop;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user