static int
eb_hostmask(const char *banstr, struct Client *client_p, struct Channel *chptr, long mode_type)
{
- char src_host[NICKLEN + USERLEN + HOSTLEN + 6];
- char src_iphost[NICKLEN + USERLEN + HOSTLEN + 6];
- char src_althost[NICKLEN + USERLEN + HOSTLEN + 6];
- char src_ip4host[NICKLEN + USERLEN + HOSTLEN + 6];
+ char src_host[NAMELEN + USERLEN + HOSTLEN + 6];
+ char src_iphost[NAMELEN + USERLEN + HOSTLEN + 6];
+ char src_althost[NAMELEN + USERLEN + HOSTLEN + 6];
+ char src_ip4host[NAMELEN + USERLEN + HOSTLEN + 6];
struct sockaddr_in ip4;
char *s = src_host, *s2 = src_iphost, *s3 = NULL, *s4 = NULL;
s3 = src_althost;
}
-#ifdef RB_IPV6
/* handle Teredo if necessary */
if (GET_SS_FAMILY(&client_p->localClient->ip) == AF_INET6 && rb_ipv4_from_ipv6((const struct sockaddr_in6 *) &client_p->localClient->ip, &ip4))
{
s4, src_ip4host + sizeof src_ip4host - s4);
s4 = src_ip4host;
}
-#endif
return match(banstr, s) || match(banstr, s2) || (s3 != NULL && match(banstr, s3)) || (s4 != NULL && match(banstr, s4)) ? EXTBAN_MATCH : EXTBAN_NOMATCH;
}