[RFC/PATCH 4/4] modules/replicated: use sin6_addr.s6_addr32

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The exported in6.h kernel header provides a convenience macro s6_addr32
for accessing the 32bit words of an ipv6 address. Use this instead of
__in6_u.__u6_addr32.

---
In fact __in6_u.__u6_addr32 isn't correct for any kernel version I looked
at (2.6.38.2, 3.4.7, master).

This error struck me as a bit weird. Have I missed something? Is this
code compiling for others?

 modules/replicated.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/replicated.c b/modules/replicated.c
index bd6003b..c666054 100644
--- a/modules/replicated.c
+++ b/modules/replicated.c
@@ -1156,7 +1156,7 @@ try_name:
 				rr4++;
 		} else if (this->ai_family == AF_INET6) {
 			struct sockaddr_in6 *addr = (struct sockaddr_in6 *) this->ai_addr;
-			if (!IN6_IS_ADDR_LOOPBACK(addr->sin6_addr.__in6_u.__u6_addr32))
+			if (!IN6_IS_ADDR_LOOPBACK(addr->sin6_addr.s6_addr32))
 				rr6++;
 		}
 		this = this->ai_next;
-- 
1.7.10.2.dirty

--
To unsubscribe from this list: send the line "unsubscribe autofs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux Ext4]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux