Match 127.*.*.* masks against IPs in the usually expected manner.
[ircu2.10.12-pk.git] / ircd / ircd_string.c
index a9d945138aed394032ca597bb9d291b1d79e625f..1ed082d6f34d6073d5d5d59041b4d8d65c7ad99a 100644 (file)
@@ -486,7 +486,7 @@ ircd_aton_ip4(const char *input, unsigned int *output, unsigned char *pbits)
     ip |= part << (24 - 8 * dots++);
     part = 0;
     if (input[pos] == '*') {
-      while (input[++pos] == '*') ;
+      while (input[++pos] == '*' || input[pos] == '.') ;
       if (input[pos] != '\0')
         return 0;
       if (pbits)
@@ -604,7 +604,7 @@ ipmask_parse(const char *input, struct irc_in_addr *ip, unsigned char *pbits)
       *pbits = part;
       goto finish;
     case '*':
-      while (input[++pos] == '*') ;
+      while (input[++pos] == '*' || input[pos] == ':') ;
       if (input[pos] != '\0' || colon < 8)
         return 0;
       if (pbits)