summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure30
-rw-r--r--make/configure.pm1
-rw-r--r--src/cidr.cpp5
-rw-r--r--src/dns.cpp7
-rw-r--r--src/modules/m_connectban.cpp6
-rw-r--r--src/modules/m_spanningtree/capab.cpp18
-rw-r--r--src/modules/m_spanningtree/uid.cpp2
-rw-r--r--src/usermanager.cpp30
-rw-r--r--src/users.cpp10
-rw-r--r--win/configure.cpp8
10 files changed, 7 insertions, 110 deletions
diff --git a/configure b/configure
index f4d910050..d9ed2e48d 100755
--- a/configure
+++ b/configure
@@ -44,7 +44,7 @@ use make::opensslcert;
our ($opt_use_gnutls, $opt_rebuild, $opt_use_openssl, $opt_nointeractive, $opt_ports,
$opt_epoll, $opt_kqueue, $opt_noports, $opt_noepoll, $opt_nokqueue,
- $opt_ipv6, $opt_ipv6links, $opt_noipv6links, $opt_maxbuf, $opt_disable_debug, $opt_freebsd_port);
+ $opt_ipv6, $opt_maxbuf, $opt_disable_debug, $opt_freebsd_port);
our ($opt_cc, $opt_base_dir, $opt_config_dir, $opt_module_dir, $opt_binary_dir,
$opt_library_dir);
@@ -70,8 +70,6 @@ GetOptions (
'disable-epoll' => \$opt_noepoll,
'disable-kqueue' => \$opt_nokqueue,
'enable-ipv6' => \$opt_ipv6,
- 'enable-remote-ipv6' => \$opt_ipv6links,
- 'disable-remote-ipv6' => \$opt_noipv6links,
'with-cc=s' => \$opt_cc,
'with-maxbuf=i' => \$opt_maxbuf,
'enable-freebsd-ports-openssl' => \$opt_freebsd_port,
@@ -112,8 +110,6 @@ our $non_interactive = (
(defined $opt_nointeractive) ||
(defined $opt_cc) ||
(defined $opt_ipv6) ||
- (defined $opt_ipv6links) ||
- (defined $opt_noipv6links) ||
(defined $opt_kqueue) ||
(defined $opt_epoll) ||
(defined $opt_ports) ||
@@ -243,15 +239,6 @@ if (defined $opt_ipv6)
{
$config{IPV6} = "y";
}
-$config{SUPPORT_IP6LINKS} = "y"; # IPv4 supporting IPv6 links (experimental)
-if (defined $opt_ipv6links)
-{
- $config{SUPPORT_IP6LINKS} = "y";
-}
-if (defined $opt_noipv6links)
-{
- $config{SUPPORT_IP6LINKS} = "n";
-}
chomp($config{GCCVER} = `g++ -dumpversion | cut -c 1`); # Major GCC Version
chomp($config{GCCMINOR} = `g++ -dumpversion | cut -c 3`);
$config{_SOMAXCONN} = SOMAXCONN; # Max connections in accept queue
@@ -654,7 +641,7 @@ should NOT be used. You should probably specify a newer compiler.\n\n";
}
if (!$chose_hiperf) {
- yesno('USE_POLL', "Would you like to use poll?\n This is likely to increase performance.\nIf you are unsure, answer yes.\n\nEnable poll?\n");
+ yesno('USE_POLL', "Would you like to use poll?\n This is likely to increase performance.\nIf you are unsure, answer yes.\n\nEnable poll?");
if ($config{USE_POLL} ne "y")
{
print "No high-performance socket engines are available, or you chose\n";
@@ -662,17 +649,9 @@ should NOT be used. You should probably specify a newer compiler.\n\n";
}
}
- yesno('IPV6',"Would you like to build InspIRCd with IPv6 support?");
+ yesno('IPV6',"Would you like to build InspIRCd with IPv6 support?\nYou can still use IPv4 addresses in your port bindings.\n\nEnable IPv6?");
print "\n";
- if ($config{IPV6} eq "y") {
- print "You have chosen to build an \e[1;32mIPV6-enabled\e[0m server.\nTo accept IPV4 users, you can still use IPV4 addresses\nin your port bindings..\n\n";
- $config{SUPPORT_IP6LINKS} = "y";
- } else {
- yesno('SUPPORT_IP6LINKS',"You have chosen to build an \e[1;32mIPV4-only\e[0m server.\nWould you like to enable support for linking to IPV6-enabled\nInspIRCd servers? If you are using a recent operating system and are\nunsure, answer yes. If you answer 'no' here, your InspIRCd server will\nbe unable to parse IPV6 addresses (e.g. for CIDR bans)\n\nEnable linking to servers which have IPV6 enabled?");
- print "\n";
- }
-
$config{USE_FREEBSD_BASE_SSL} = "n";
$config{USE_FREEBSD_PORTS_SSL} = "n";
if ($config{HAS_OPENSSL_PORT} ne "")
@@ -987,9 +966,6 @@ print FILEHANDLE "#define MAXBUF " . ($config{MAXBUF}+2) . "\n";
if ($config{IPV6} =~ /y/i) {
print FILEHANDLE "#define IPV6\n";
}
- if ($config{SUPPORT_IP6LINKS} =~ /y/i) {
- print FILEHANDLE "#define SUPPORT_IP6LINKS\n";
- }
if ($config{HAS_EVENTFD} eq 'true') {
print FILEHANDLE "#define HAS_EVENTFD\n";
}
diff --git a/make/configure.pm b/make/configure.pm
index 00e50c328..487df137f 100644
--- a/make/configure.pm
+++ b/make/configure.pm
@@ -215,7 +215,6 @@ sub dumphash()
print "\e[0mGCC Version Found:\e[1;32m\t\t$main::config{GCCVER}.$main::config{GCCMINOR}\e[0m\n";
print "\e[0mCompiler program:\e[1;32m\t\t$main::config{CC}\e[0m\n";
print "\e[0mIPv6 Support:\e[1;32m\t\t\t$main::config{IPV6}\e[0m\n";
- print "\e[0mIPv6 to IPv4 Links:\e[1;32m\t\t$main::config{SUPPORT_IP6LINKS}\e[0m\n";
print "\e[0mGnuTLS Support:\e[1;32m\t\t\t$main::config{USE_GNUTLS}\e[0m\n";
print "\e[0mOpenSSL Support:\e[1;32m\t\t$main::config{USE_OPENSSL}\e[0m\n\n";
print "\e[1;32mImportant note: The maximum length values are now configured in the\e[0m\n";
diff --git a/src/cidr.cpp b/src/cidr.cpp
index 040681766..d38056b02 100644
--- a/src/cidr.cpp
+++ b/src/cidr.cpp
@@ -121,7 +121,6 @@ bool irc::sockets::MatchCIDR(const std::string &address, const std::string &cidr
return false;
}
-#ifdef SUPPORT_IP6LINKS
in6_addr address_in6;
in6_addr mask_in6;
@@ -143,9 +142,7 @@ bool irc::sockets::MatchCIDR(const std::string &address, const std::string &cidr
return false;
}
}
- else
-#endif
- if (inet_pton(AF_INET, address_copy.c_str(), &address_in4) > 0)
+ else if (inet_pton(AF_INET, address_copy.c_str(), &address_in4) > 0)
{
if (inet_pton(AF_INET, cidr_copy.c_str(), &mask_in4) > 0)
{
diff --git a/src/dns.cpp b/src/dns.cpp
index 75108d577..79a2e2473 100644
--- a/src/dns.cpp
+++ b/src/dns.cpp
@@ -550,7 +550,7 @@ int DNS::GetNameForce(const char *ip, ForceProtocol fp)
DNSHeader h;
int id;
int length;
-#ifdef SUPPORT_IP6LINKS
+
if (fp == PROTOCOL_IPV6)
{
in6_addr i;
@@ -563,7 +563,6 @@ int DNS::GetNameForce(const char *ip, ForceProtocol fp)
return -1;
}
else
-#endif
{
in_addr i;
if (inet_aton(ip, &i))
@@ -591,7 +590,6 @@ int DNS::GetNameForce(const char *ip, ForceProtocol fp)
*/
void DNS::MakeIP6Int(char* query, const in6_addr *ip)
{
-#ifdef SUPPORT_IP6LINKS
const char* hex = "0123456789abcdef";
for (int index = 31; index >= 0; index--) /* for() loop steps twice per byte */
{
@@ -604,9 +602,6 @@ void DNS::MakeIP6Int(char* query, const in6_addr *ip)
*query++ = '.'; /* Seperator */
}
strcpy(query,"ip6.arpa"); /* Suffix the string */
-#else
- *query = 0;
-#endif
}
/** Return the next id which is ready, and the result attached to it */
diff --git a/src/modules/m_connectban.cpp b/src/modules/m_connectban.cpp
index 19408046f..524edb8a5 100644
--- a/src/modules/m_connectban.cpp
+++ b/src/modules/m_connectban.cpp
@@ -74,17 +74,11 @@ class ModuleConnectBan : public Module
switch (u->GetProtocolFamily())
{
- #ifdef SUPPORT_IP6LINKS
case AF_INET6:
- {
range = ipv6_cidr;
- }
break;
- #endif
case AF_INET:
- {
range = ipv4_cidr;
- }
break;
}
diff --git a/src/modules/m_spanningtree/capab.cpp b/src/modules/m_spanningtree/capab.cpp
index aa4ab5e03..7c37e67eb 100644
--- a/src/modules/m_spanningtree/capab.cpp
+++ b/src/modules/m_spanningtree/capab.cpp
@@ -65,13 +65,9 @@ void TreeSocket::SendCapabilities()
this->WriteLine(line);
int ip6 = 0;
- int ip6support = 0;
#ifdef IPV6
ip6 = 1;
#endif
-#ifdef SUPPORT_IP6LINKS
- ip6support = 1;
-#endif
std::string extra;
/* Do we have sha256 available? If so, we send a challenge */
if (Utils->ChallengeResponse && (ServerInstance->Modules->Find("m_sha256.so")))
@@ -92,7 +88,7 @@ void TreeSocket::SendCapabilities()
" MAXGECOS="+ConvToStr(ServerInstance->Config->Limits.MaxGecos)+
" MAXAWAY="+ConvToStr(ServerInstance->Config->Limits.MaxAway)+
" IP6NATIVE="+ConvToStr(ip6)+
- " IP6SUPPORT="+ConvToStr(ip6support)+
+ " IP6SUPPORT=1"+
" PROTOCOL="+ConvToStr(ProtocolVersion)+extra+
" PREFIX="+ServerInstance->Modes->BuildPrefixes()+
" CHANMODES="+ServerInstance->Modes->GiveModeList(MASK_CHANNEL)+
@@ -148,13 +144,7 @@ bool TreeSocket::Capab(const std::deque<std::string> &params)
else if (params[0] == "END")
{
std::string reason;
- int ip6support = 0;
-#ifdef SUPPORT_IP6LINKS
- ip6support = 1;
-#endif
- /* Compare ModuleList and check CapKeys...
- * Maybe this could be tidier? -- Brain
- */
+ /* Compare ModuleList and check CapKeys */
if ((this->ModuleList != this->MyCapabilities()) && (this->ModuleList.length()))
{
std::string diffIneed = ListDifference(this->ModuleList, this->MyCapabilities());
@@ -174,10 +164,6 @@ bool TreeSocket::Capab(const std::deque<std::string> &params)
this->SendError("CAPAB negotiation failed: "+reason);
return false;
}
- if (((this->CapKeys.find("IP6SUPPORT") == this->CapKeys.end()) && (ip6support)) || ((this->CapKeys.find("IP6SUPPORT") != this->CapKeys.end()) && (this->CapKeys.find("IP6SUPPORT")->second != ConvToStr(ip6support))))
- reason = "We don't both support linking to IPV6 servers";
- if (((this->CapKeys.find("IP6NATIVE") != this->CapKeys.end()) && (this->CapKeys.find("IP6NATIVE")->second == "1")) && (!ip6support))
- reason = "The remote server is IPV6 native, and we don't support linking to IPV6 servers";
if (this->CapKeys.find("PROTOCOL") == this->CapKeys.end())
{
reason = "Protocol version not specified";
diff --git a/src/modules/m_spanningtree/uid.cpp b/src/modules/m_spanningtree/uid.cpp
index f8efbfd24..40f8e18ab 100644
--- a/src/modules/m_spanningtree/uid.cpp
+++ b/src/modules/m_spanningtree/uid.cpp
@@ -157,11 +157,9 @@ bool TreeSocket::ParseUID(const std::string &source, std::deque<std::string> &pa
if (params[8][0] != '+')
params[8] = "+" + params[8];
-#ifdef SUPPORT_IP6LINKS
if (params[6].find_first_of(":") != std::string::npos)
_new->SetSockAddr(AF_INET6, params[6].c_str(), 0);
else
-#endif
_new->SetSockAddr(AF_INET, params[6].c_str(), 0);
ServerInstance->Users->AddGlobalClone(_new);
diff --git a/src/usermanager.cpp b/src/usermanager.cpp
index da8061fba..0ebf1f6c7 100644
--- a/src/usermanager.cpp
+++ b/src/usermanager.cpp
@@ -222,17 +222,11 @@ void UserManager::AddLocalClone(User *user)
clonemap::iterator x;
switch (user->GetProtocolFamily())
{
-#ifdef SUPPORT_IP6LINKS
case AF_INET6:
- {
range = ServerInstance->Config->c_ipv6_range;
- }
break;
-#endif
case AF_INET:
- {
range = ServerInstance->Config->c_ipv4_range;
- }
break;
}
@@ -249,17 +243,11 @@ void UserManager::AddGlobalClone(User *user)
clonemap::iterator x;
switch (user->GetProtocolFamily())
{
-#ifdef SUPPORT_IP6LINKS
case AF_INET6:
- {
range = ServerInstance->Config->c_ipv6_range;
- }
break;
-#endif
case AF_INET:
- {
range = ServerInstance->Config->c_ipv4_range;
- }
break;
}
@@ -275,17 +263,11 @@ void UserManager::RemoveCloneCounts(User *user)
int range = 32;
switch (user->GetProtocolFamily())
{
-#ifdef SUPPORT_IP6LINKS
case AF_INET6:
- {
range = ServerInstance->Config->c_ipv6_range;
- }
break;
-#endif
case AF_INET:
- {
range = ServerInstance->Config->c_ipv4_range;
- }
break;
}
@@ -315,17 +297,11 @@ unsigned long UserManager::GlobalCloneCount(User *user)
int range = 32;
switch (user->GetProtocolFamily())
{
-#ifdef SUPPORT_IP6LINKS
case AF_INET6:
- {
range = ServerInstance->Config->c_ipv6_range;
- }
break;
-#endif
case AF_INET:
- {
range = ServerInstance->Config->c_ipv4_range;
- }
break;
}
clonemap::iterator x = global_clones.find(user->GetCIDRMask(range));
@@ -340,17 +316,11 @@ unsigned long UserManager::LocalCloneCount(User *user)
int range = 32;
switch (user->GetProtocolFamily())
{
-#ifdef SUPPORT_IP6LINKS
case AF_INET6:
- {
range = ServerInstance->Config->c_ipv6_range;
- }
break;
-#endif
case AF_INET:
- {
range = ServerInstance->Config->c_ipv4_range;
- }
break;
}
clonemap::iterator x = local_clones.find(user->GetCIDRMask(range));
diff --git a/src/users.cpp b/src/users.cpp
index b3e6ef58f..f210ed470 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -272,12 +272,10 @@ User::~User()
{
delete (sockaddr_in*)ip;
}
-#ifdef SUPPORT_IP6LINKS
else
{
delete (sockaddr_in6*)ip;
}
-#endif
}
ServerInstance->Users->uuidlist->erase(uuid);
@@ -1080,7 +1078,6 @@ void User::SetSockAddr(int protocol_family, const char* sip, int port)
switch (protocol_family)
{
-#ifdef SUPPORT_IP6LINKS
case AF_INET6:
{
sockaddr_in6* sin = new sockaddr_in6;
@@ -1090,7 +1087,6 @@ void User::SetSockAddr(int protocol_family, const char* sip, int port)
this->ip = (sockaddr*)sin;
}
break;
-#endif
case AF_INET:
{
sockaddr_in* sin = new sockaddr_in;
@@ -1113,14 +1109,12 @@ int User::GetPort()
switch (this->GetProtocolFamily())
{
-#ifdef SUPPORT_IP6LINKS
case AF_INET6:
{
sockaddr_in6* sin = (sockaddr_in6*)this->ip;
return sin->sin6_port;
}
break;
-#endif
case AF_INET:
{
sockaddr_in* sin = (sockaddr_in*)this->ip;
@@ -1158,7 +1152,6 @@ const char* User::GetCIDRMask(int range)
*/
switch (this->GetProtocolFamily())
{
-#ifdef SUPPORT_IP6LINKS
case AF_INET6:
{
/* unsigned char s6_addr[16]; */
@@ -1207,7 +1200,6 @@ const char* User::GetCIDRMask(int range)
return buf;
}
break;
-#endif
case AF_INET:
{
struct in_addr v4;
@@ -1261,7 +1253,6 @@ const char* User::GetIPString()
switch (this->GetProtocolFamily())
{
-#ifdef SUPPORT_IP6LINKS
case AF_INET6:
{
static char temp[1024];
@@ -1281,7 +1272,6 @@ const char* User::GetIPString()
return buf;
}
break;
-#endif
case AF_INET:
{
sockaddr_in* sin = (sockaddr_in*)this->ip;
diff --git a/win/configure.cpp b/win/configure.cpp
index 56b396bc2..b6f009fda 100644
--- a/win/configure.cpp
+++ b/win/configure.cpp
@@ -190,7 +190,6 @@ void Banner()
void Run()
{
bool use_iocp = false;
- bool support_ip6links = true;
bool use_openssl = false;
bool ipv6 = true;
char mod_path[MAX_PATH];
@@ -242,11 +241,6 @@ void Run()
ipv6 = get_bool_option("Do you want to enable IPv6?", false);
- if (!ipv6)
- support_ip6links = get_bool_option("\nYou have chosen to build an \033[1;32mIPV4-only\033[0m server.\nWould you like to enable support for linking to IPV6-enabled InspIRCd servers?\nIf you are using a recent operating system and are unsure, answer yes.\nIf you answer 'no' here, your InspIRCd server will be unable\nto parse IPV6 addresses (e.g. for CIDR bans)", true);
- else
- support_ip6links = true;
-
printf_c("\033[1mAll paths are relative to the binary directory.\033[0m\n");
get_string_option("In what directory do you wish to install the InspIRCd base?", "..", base_path);
get_string_option("In what directory are the configuration files?", "../conf", config_file);
@@ -339,8 +333,6 @@ void Run()
fprintf(f, "#define LIBRARYDIR \"%s\"\n", library_dir);
fprintf(f, "#define VERSION \"%s\"\n", version);
fprintf(f, "#define REVISION \"%s\"\n", revision_text);
- if(support_ip6links)
- fprintf(f, "#define SUPPORT_IP6LINKS 1\n");
OSVERSIONINFO vi;
vi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);