lkml.org 
[lkml]   [2012]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH net-next 20/21] lockd: Convert ipv4_is_<foo> uses to ipv4_addr_<foo>
Date
Use the new ipv4_addr_<foo> functions to be consistent with
the ipv6_addr_<foo> and eth_addr_<foo> style.

Signed-off-by: Joe Perches <joe@perches.com>
---
include/linux/lockd/lockd.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h
index f5a051a..8fa00e0 100644
--- a/include/linux/lockd/lockd.h
+++ b/include/linux/lockd/lockd.h
@@ -301,7 +301,7 @@ static inline int __nlm_privileged_request4(const struct sockaddr *sap)
if (ntohs(sin->sin_port) > 1023)
return 0;

- return ipv4_is_loopback(sin->sin_addr.s_addr);
+ return ipv4_addr_loopback(sin->sin_addr.s_addr);
}

#if IS_ENABLED(CONFIG_IPV6)
@@ -313,7 +313,7 @@ static inline int __nlm_privileged_request6(const struct sockaddr *sap)
return 0;

if (ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_MAPPED)
- return ipv4_is_loopback(sin6->sin6_addr.s6_addr32[3]);
+ return ipv4_addr_loopback(sin6->sin6_addr.s6_addr32[3]);

return ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LOOPBACK;
}
--
1.7.8.111.gad25c.dirty


\
 
 \ /
  Last update: 2012-10-19 07:21    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog