From 64e9c90e69cd8b0fe8dd60024ccbe528705fbd8f Mon Sep 17 00:00:00 2001 From: David du Colombier Date: Tue, 22 Mar 2011 11:39:41 +0100 Subject: [PATCH] [BUG] standard: is_addr return value for IPv4 was inverted --- include/common/standard.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/common/standard.h b/include/common/standard.h index 712d941286..7cfd5e225b 100644 --- a/include/common/standard.h +++ b/include/common/standard.h @@ -475,7 +475,7 @@ static inline int is_addr(struct sockaddr_storage *addr) switch (addr->ss_family) { case AF_INET: - return *(int *)&((struct sockaddr_in *)&addr)->sin_addr; + return *(int *)&((struct sockaddr_in *)addr)->sin_addr; case AF_INET6: for (i = 0; i < sizeof(struct in6_addr) / sizeof(int); i++) if (((int *)&((struct sockaddr_in6 *)addr)->sin6_addr)[i] != 0) -- 2.47.3