| 217 |
|
* Reset next-connect cycle of all connect{} blocks that match |
| 218 |
|
* this servername. |
| 219 |
|
*/ |
| 220 |
< |
conf->hold = CurrentTime + conf->class->con_freq; |
| 220 |
> |
conf->until = CurrentTime + conf->class->con_freq; |
| 221 |
|
} |
| 222 |
|
} |
| 223 |
|
else |
| 302 |
|
sizeof(new_client->sockhost), NULL, 0, NI_NUMERICHOST); |
| 303 |
|
new_client->localClient->aftype = new_client->localClient->ip.ss.ss_family; |
| 304 |
|
|
| 305 |
+ |
#ifdef HAVE_LIBGEOIP |
| 306 |
+ |
/* XXX IPV6 SUPPORT XXX */ |
| 307 |
+ |
if (irn->ss.ss_family == AF_INET && geoip_ctx) |
| 308 |
+ |
{ |
| 309 |
+ |
const struct sockaddr_in *v4 = (const struct sockaddr_in *)&new_client->localClient->ip; |
| 310 |
+ |
new_client->localClient->country_id = GeoIP_id_by_ipnum(geoip_ctx, (unsigned long)ntohl(v4->sin_addr.s_addr)); |
| 311 |
+ |
} |
| 312 |
+ |
#endif |
| 313 |
+ |
|
| 314 |
|
if (new_client->sockhost[0] == ':' && new_client->sockhost[1] == ':') |
| 315 |
|
{ |
| 316 |
|
strlcpy(new_client->host, "0", sizeof(new_client->host)); |