mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 06:32:08 +00:00
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:
parent
1ded132d4c
commit
dfd56b8b38
48 changed files with 161 additions and 164 deletions
|
@ -301,7 +301,7 @@ static inline int __nlm_privileged_request4(const struct sockaddr *sap)
|
|||
return ipv4_is_loopback(sin->sin_addr.s_addr);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
static inline int __nlm_privileged_request6(const struct sockaddr *sap)
|
||||
{
|
||||
const struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sap;
|
||||
|
@ -314,12 +314,12 @@ static inline int __nlm_privileged_request6(const struct sockaddr *sap)
|
|||
|
||||
return ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LOOPBACK;
|
||||
}
|
||||
#else /* defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) */
|
||||
#else /* IS_ENABLED(CONFIG_IPV6) */
|
||||
static inline int __nlm_privileged_request6(const struct sockaddr *sap)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif /* defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) */
|
||||
#endif /* IS_ENABLED(CONFIG_IPV6) */
|
||||
|
||||
/*
|
||||
* Ensure incoming requests are from local privileged callers.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue