From: David du Colombier Date: Tue, 22 Mar 2011 10:39:41 +0000 (+0100) Subject: [BUG] standard: is_addr return value for IPv4 was inverted X-Git-Tag: v1.5-dev8~268 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=64e9c90e69cd8b0fe8dd60024ccbe528705fbd8f;p=thirdparty%2Fhaproxy.git [BUG] standard: is_addr return value for IPv4 was inverted --- 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)