summaryrefslogtreecommitdiff
path: root/include/netinet/in.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/netinet/in.h')
-rw-r--r--include/netinet/in.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/netinet/in.h b/include/netinet/in.h
index fb628b61..60bbaa75 100644
--- a/include/netinet/in.h
+++ b/include/netinet/in.h
@@ -132,7 +132,8 @@ uint16_t ntohs(uint16_t);
#define IN6_IS_ADDR_V4COMPAT(a) \
(((uint32_t *) (a))[0] == 0 && ((uint32_t *) (a))[1] == 0 && \
- ((uint32_t *) (a))[2] == 0 && ((uint8_t *) (a))[15] > 1)
+ ((uint32_t *) (a))[2] == 0 && \
+ !IN6_IS_ADDR_UNSPECIFIED(a) && !IN6_IS_ADDR_LOOPBACK(a))
#define IN6_IS_ADDR_MC_NODELOCAL(a) \
(IN6_IS_ADDR_MULTICAST(a) && ((((uint8_t *) (a))[1] & 0xf) == 0x1))