X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/143b6cc1e4a8faa8181301bf43ddafecab3237cc..cb097b8840594b6a77aab21d0b4c20f036a7d012:/src/hostmask.c diff --git a/src/hostmask.c b/src/hostmask.c index a0a193d..806ecb8 100644 --- a/src/hostmask.c +++ b/src/hostmask.c @@ -62,7 +62,11 @@ parse_netmask(const char *text, struct sockaddr *naddr, int *nb) addr = (struct rb_sockaddr_storage *)&xaddr; else addr = (struct rb_sockaddr_storage *)naddr; - + + if(strpbrk(ip, "*?") != NULL) + { + return HM_HOST; + } #ifdef RB_IPV6 if(strchr(ip, ':')) { @@ -446,7 +450,6 @@ find_exact_conf_by_address(const char *address, int type, const char *username) if(address == NULL) address = "/NOMATCH!/"; - arec = rb_malloc(sizeof(struct AddressRec)); masktype = parse_netmask(address, (struct sockaddr *)&addr, &bits); #ifdef RB_IPV6 if(masktype == HM_IPV6) @@ -704,7 +707,7 @@ show_iline_prefix(struct Client *sptr, struct ConfItem *aconf, char *name) void report_auth(struct Client *client_p) { - char *name, *host, *pass = "*", *user, *classname; + char *name, *host, *pass, *user, *classname; struct AddressRec *arec; struct ConfItem *aconf; int i, port;