]> jfr.im git - solanum.git/blobdiff - ircd/newconf.c
remove RB_IPV6
[solanum.git] / ircd / newconf.c
index 27207ff08c7b519d4d7f3a18e020d2cd1fc34720..c2d6614062ccbfbe774e57b8f673ea4c99d50376 100644 (file)
@@ -259,7 +259,6 @@ static void
 conf_set_serverinfo_vhost6(void *data)
 {
 
-#ifdef RB_IPV6
        struct rb_sockaddr_storage addr;
 
        if(rb_inet_pton_sock(data, (struct sockaddr *)&addr) <= 0 || GET_SS_FAMILY(&addr) != AF_INET6)
@@ -269,9 +268,6 @@ conf_set_serverinfo_vhost6(void *data)
        }
 
        ServerInfo.bind6 = addr;
-#else
-       conf_report_error("Warning -- ignoring serverinfo::vhost6 -- IPv6 support not available.");
-#endif
 }
 
 static void
@@ -778,7 +774,6 @@ conf_set_class_cidr_ipv4_bitlen(void *data)
 
 }
 
-#ifdef RB_IPV6
 static void
 conf_set_class_cidr_ipv6_bitlen(void *data)
 {
@@ -791,7 +786,6 @@ conf_set_class_cidr_ipv6_bitlen(void *data)
                yy_class->cidr_ipv6_bitlen = *(unsigned int *) data;
 
 }
-#endif
 
 static void
 conf_set_class_number_per_cidr(void *data)
@@ -890,18 +884,14 @@ conf_set_listen_port_both(void *data, int ssl)
                                                     "It is suggested that users be migrated to SSL/TLS connections.", args->v.number);
                        }
                        add_listener(args->v.number, listener_address, AF_INET, ssl, ssl || yy_defer_accept, yy_wsock);
-#ifdef RB_IPV6
                        add_listener(args->v.number, listener_address, AF_INET6, ssl, ssl || yy_defer_accept, yy_wsock);
-#endif
                 }
                else
                 {
                        int family;
-#ifdef RB_IPV6
                        if(strchr(listener_address, ':') != NULL)
                                family = AF_INET6;
                        else
-#endif
                                family = AF_INET;
 
                        if (!ssl)
@@ -1320,9 +1310,7 @@ conf_end_connect(struct TopConf *tc)
 
        if(EmptyString(yy_server->connect_host)
                        && GET_SS_FAMILY(&yy_server->connect4) != AF_INET
-#ifdef RB_IPV6
                        && GET_SS_FAMILY(&yy_server->connect6) != AF_INET6
-#endif
                )
        {
                conf_report_error("Ignoring connect block for %s -- missing host.",
@@ -1359,12 +1347,10 @@ conf_set_connect_host(void *data)
        {
                yy_server->connect4 = addr;
        }
-#ifdef RB_IPV6
        else if(GET_SS_FAMILY(&addr) == AF_INET6)
        {
                yy_server->connect6 = addr;
        }
-#endif
        else
        {
                conf_report_error("Unsupported IP address for server connect host (%s)",
@@ -1387,12 +1373,10 @@ conf_set_connect_vhost(void *data)
        {
                yy_server->bind4 = addr;
        }
-#ifdef RB_IPV6
        else if(GET_SS_FAMILY(&addr) == AF_INET6)
        {
                yy_server->bind6 = addr;
        }
-#endif
        else
        {
                conf_report_error("Unsupported IP address for server connect vhost (%s)",
@@ -1453,10 +1437,8 @@ conf_set_connect_aftype(void *data)
 
        if(rb_strcasecmp(aft, "ipv4") == 0)
                yy_server->aftype = AF_INET;
-#ifdef RB_IPV6
        else if(rb_strcasecmp(aft, "ipv6") == 0)
                yy_server->aftype = AF_INET6;
-#endif
        else
                conf_report_error("connect::aftype '%s' is unknown.", aft);
 }
@@ -2207,7 +2189,6 @@ conf_set_opm_listen_address_both(void *data, bool ipv6)
 
        if(ipv6)
        {
-#ifdef RB_IPV6
                if(GET_SS_FAMILY(&addr) != AF_INET6)
                {
                        conf_report_error("%s is of the wrong address type: %s", confstr, ip);
@@ -2221,10 +2202,6 @@ conf_set_opm_listen_address_both(void *data, bool ipv6)
                }
 
                yy_opm_address_ipv6 = rb_strdup(ip);
-#else
-               conf_report_error("%s requires IPv6 support in your ircd", confstr, ip);
-               return;
-#endif
        }
        else
        {
@@ -2262,14 +2239,6 @@ conf_set_opm_listen_port_both(void *data, bool ipv6)
        int port = *((int *)data);
        const char *confstr = (ipv6 ? "opm::port_ipv6" : "opm::port_ipv4");
 
-#ifndef RB_IPV6
-       if(ipv6)
-       {
-               conf_report_error("%s requires IPv6 support in your ircd", confstr);
-               return;
-       }
-#endif
-
        if(port > 65535 || port <= 0)
        {
                conf_report_error("%s is out of range: %d", confstr, port);
@@ -2696,9 +2665,7 @@ static struct ConfEntry conf_class_table[] =
 {
        { "ping_time",          CF_TIME, conf_set_class_ping_time,              0, NULL },
        { "cidr_ipv4_bitlen",   CF_INT,  conf_set_class_cidr_ipv4_bitlen,               0, NULL },
-#ifdef RB_IPV6
        { "cidr_ipv6_bitlen",   CF_INT,  conf_set_class_cidr_ipv6_bitlen,               0, NULL },
-#endif
        { "number_per_cidr",    CF_INT,  conf_set_class_number_per_cidr,        0, NULL },
        { "number_per_ip",      CF_INT,  conf_set_class_number_per_ip,          0, NULL },
        { "number_per_ip_global", CF_INT,conf_set_class_number_per_ip_global,   0, NULL },