]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/socket.cpp
This fixes a deletion error here, we were using new[] and not using delete[], but...
[user/henk/code/inspircd.git] / src / socket.cpp
index 3e9db5fd430fcdf42eea20aaa08e3d0fed48438e..2465506e919f8be1230cb380c20bc9b49964274a 100644 (file)
@@ -12,8 +12,6 @@
  */
 
 #include "inspircd.h"
-#include <string>
-#include "configreader.h"
 #include "socket.h"
 #include "socketengine.h"
 #include "wildcard.h"
@@ -122,7 +120,7 @@ void ListenSocket::HandleEvent(EventType et, int errornum)
        else
        {
                ServerInstance->SE->Shutdown(incomingSockfd, 2);
-               close(incomingSockfd);
+               ServerInstance->SE->Close(incomingSockfd);
                ServerInstance->stats->statsRefused++;
        }
        delete[] client;
@@ -466,7 +464,10 @@ int InspIRCd::BindPorts(bool bail, int &ports_found, FailedPortList &failed_port
                Config->ConfValue(Config->config_data, "bind", "port", count, configToken, MAXBUF);
                Config->ConfValue(Config->config_data, "bind", "address", count, Addr, MAXBUF);
                Config->ConfValue(Config->config_data, "bind", "type", count, Type, MAXBUF);
-
+               
+               if (strncmp(Addr, "::ffff:", 7) == 0)
+                       this->Log(DEFAULT, "Using 4in6 (::ffff:) isn't recommended. You should bind IPv4 addresses directly instead.");
+               
                if ((!*Type) || (!strcmp(Type,"clients")))
                {
                        irc::portparser portrange(configToken, false);