]> jfr.im git - solanum.git/blobdiff - ircd/newconf.c
providers/opm: use a name that makes more sense for this variable
[solanum.git] / ircd / newconf.c
index 3a0ba66d73a69805f9ba76a8b3ce6849e2a17835..78006931b6183627c416523df90fd5f8bdb6d526 100644 (file)
@@ -1969,9 +1969,11 @@ conf_set_blacklist_reason(void *data)
        if (yy_blacklist_host && data)
        {
                yy_blacklist_reason = rb_strdup(data);
-               if (yy_blacklist_iptype & IPTYPE_IPV4)
+               if (yy_blacklist_iptype & IPTYPE_IPV6)
                {
-                       /* Make sure things fit (64 = alnum count + dots) */
+                       /* Make sure things fit (magic number 64 = alnum count + dots)
+                        * Example: 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa
+                        */
                        if ((64 + strlen(yy_blacklist_host)) > IRCD_RES_HOSTLEN)
                        {
                                conf_report_error("blacklist::host %s results in IPv6 queries that are too long",
@@ -1982,7 +1984,9 @@ conf_set_blacklist_reason(void *data)
                /* Avoid doing redundant check, IPv6 is bigger than IPv4 --Elizabeth */
                if ((yy_blacklist_iptype & IPTYPE_IPV4) && !(yy_blacklist_iptype & IPTYPE_IPV6))
                {
-                       /* Make sure things fit (16 = number of nums + dots) */
+                       /* Make sure things fit for worst case (magic number 16 = number of nums + dots)
+                        * Example: 127.127.127.127.in-addr.arpa
+                        */
                        if ((16 + strlen(yy_blacklist_host)) > IRCD_RES_HOSTLEN)
                        {
                                conf_report_error("blacklist::host %s results in IPv4 queries that are too long",