diff options
Diffstat (limited to 'src/hostmask.c')
-rw-r--r-- | src/hostmask.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/hostmask.c b/src/hostmask.c index 4cf0845..96b85ee 100644 --- a/src/hostmask.c +++ b/src/hostmask.c @@ -247,12 +247,12 @@ try_parse_v4_netmask(const char *text, struct irc_ssaddr *addr, int *b) int parse_netmask(const char *text, struct irc_ssaddr *addr, int *b) { + if (strchr(text, '.')) + return try_parse_v4_netmask(text, addr, b); #ifdef IPV6 if (strchr(text, ':')) return try_parse_v6_netmask(text, addr, b); #endif - if (strchr(text, '.')) - return try_parse_v4_netmask(text, addr, b); return HM_HOST; } @@ -630,7 +630,7 @@ find_dline_conf(struct irc_ssaddr *addr, int aftype) * Output: None * Side-effects: Adds this entry to the hash table. */ -void +struct AddressRec * add_conf_by_address(const unsigned int type, struct MaskItem *conf) { const char *address; @@ -674,6 +674,8 @@ add_conf_by_address(const unsigned int type, struct MaskItem *conf) dlinkAdd(arec, &arec->node, &atable[get_mask_hash(address)]); break; } + + return arec; } /* void delete_one_address(const char*, struct MaskItem*) |