92 |
|
* if successful save hp in the conf item it was called with |
93 |
|
*/ |
94 |
|
static void |
95 |
< |
conf_dns_callback(void *vptr, const struct irc_ssaddr *addr, const char *name) |
95 |
> |
conf_dns_callback(void *vptr, const struct irc_ssaddr *addr, const char *name, size_t namelength) |
96 |
|
{ |
97 |
|
struct MaskItem *conf = vptr; |
98 |
|
|
99 |
|
conf->dns_pending = 0; |
100 |
|
|
101 |
+ |
if (EmptyString(name) || namelength > HOSTLEN) |
102 |
+ |
return; |
103 |
+ |
|
104 |
|
if (addr) |
105 |
|
memcpy(&conf->addr, addr, sizeof(conf->addr)); |
106 |
|
else |
362 |
|
|
363 |
|
ip_found = ipcache_find_or_add_address(&client_p->localClient->ip); |
364 |
|
ip_found->count++; |
365 |
< |
SetIpHash(client_p); |
365 |
> |
AddFlag(client_p, FLAGS_IPHASH); |
366 |
|
|
367 |
|
count_user_host(client_p->username, client_p->host, |
368 |
|
&global, &local, &ident); |