GeoIPRegion *region;
dns_geoip_subtype_t subtype;
isc_uint32_t ipnum = 0;
- int maxlen = 0, id;
+ int maxlen = 0, id, family;
const char *cs;
char *s;
#ifdef HAVE_GEOIP_V6
INSIST(geoip != NULL);
- switch (reqaddr->family) {
+ family = reqaddr->family;
+ switch (family) {
case AF_INET:
ipnum = ntohl(reqaddr->type.in.s_addr);
break;
INSIST(elt->as_string != NULL);
- cs = country_lookup(db, subtype, reqaddr->family,
- ipnum, ipnum6);
+ cs = country_lookup(db, subtype, family, ipnum, ipnum6);
if (cs != NULL && strncasecmp(elt->as_string, cs, maxlen) == 0)
return (ISC_TRUE);
break;
if (db == NULL)
return (ISC_FALSE);
- record = city_lookup(db, subtype,
- reqaddr->family, ipnum, ipnum6);
+ record = city_lookup(db, subtype, family, ipnum, ipnum6);
if (record == NULL)
break;
if (db == NULL)
return (ISC_FALSE);
- record = city_lookup(db, subtype,
- reqaddr->family, ipnum, ipnum6);
+ record = city_lookup(db, subtype, family, ipnum, ipnum6);
if (record == NULL)
break;
if (db == NULL)
return (ISC_FALSE);
- record = city_lookup(db, subtype,
- reqaddr->family, ipnum, ipnum6);
+ record = city_lookup(db, subtype, family, ipnum, ipnum6);
if (record == NULL)
break;
INSIST(elt->as_string != NULL);
/* Region DB is not supported for IPv6 */
- if (reqaddr->family == AF_INET6)
+ if (family == AF_INET6)
return (ISC_FALSE);
region = region_lookup(geoip->region, subtype, ipnum);
INSIST(elt->as_string != NULL);
/* ISP, Org, AS, and Domain are not supported for IPv6 */
- if (reqaddr->family == AF_INET6)
+ if (family == AF_INET6)
return (ISC_FALSE);
s = name_lookup(db, subtype, ipnum);
INSIST(geoip->netspeed != NULL);
/* Netspeed DB is not supported for IPv6 */
- if (reqaddr->family == AF_INET6)
+ if (family == AF_INET6)
return (ISC_FALSE);
id = netspeed_lookup(geoip->netspeed, subtype, ipnum);