From 3b0c5ae46774e8523cb02d6ecb7c2c25ec21e97b Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Tue, 25 Nov 2008 16:26:58 +0000 Subject: In preparation for the upcomming IPv6 nameservers patch, the internal ares_addr union is now changed into an internal struct which also holds the address family. --- ares/ares_gethostbyname.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ares/ares_gethostbyname.c') diff --git a/ares/ares_gethostbyname.c b/ares/ares_gethostbyname.c index 53ca2d94a..e452142e5 100644 --- a/ares/ares_gethostbyname.c +++ b/ares/ares_gethostbyname.c @@ -432,13 +432,13 @@ static int get_address_index(struct in_addr *addr, struct apattern *sortlist, continue; if (sortlist[i].type == PATTERN_MASK) { - if ((addr->s_addr & sortlist[i].mask.addr.addr4.s_addr) - == sortlist[i].addr.addr4.s_addr) + if ((addr->s_addr & sortlist[i].mask.addr4.s_addr) + == sortlist[i].addrV4.s_addr) break; } else { - if (!ares_bitncmp(&addr->s_addr, &sortlist[i].addr.addr4.s_addr, + if (!ares_bitncmp(&addr->s_addr, &sortlist[i].addrV4.s_addr, sortlist[i].mask.bits)) break; } @@ -485,7 +485,7 @@ static int get6_address_index(struct in6_addr *addr, struct apattern *sortlist, { if (sortlist[i].family != AF_INET6) continue; - if (!ares_bitncmp(&addr->s6_addr, &sortlist[i].addr.addr6.s6_addr, sortlist[i].mask.bits)) + if (!ares_bitncmp(&addr->s6_addr, &sortlist[i].addrV6.s6_addr, sortlist[i].mask.bits)) break; } return i; -- cgit v1.2.3