diff options
-rw-r--r-- | src/inspsocket.cpp | 2 | ||||
-rw-r--r-- | src/socket.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp index f408de6dd..678583ed0 100644 --- a/src/inspsocket.cpp +++ b/src/inspsocket.cpp @@ -146,7 +146,7 @@ bool InspSocket::BindAddr() std::string IP = Conf.ReadValue("bind","address",j); if (Type == "servers") { - if ((IP != "*") && (IP != "127.0.0.1") && (IP != "")) + if ((IP != "*") && (IP != "127.0.0.1") && (IP != "") && (IP != "::1")) { insp_sockaddr s; diff --git a/src/socket.cpp b/src/socket.cpp index 472d58c2e..861cd9b12 100644 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -294,7 +294,7 @@ bool InspIRCd::BindSocket(int sockfd, insp_sockaddr client, insp_sockaddr server *addr = 0; if ((*addr) && (insp_aton(addr,&addy) < 1)) - return false;; + return false; #ifdef IPV6 server.sin6_family = AF_FAMILY; @@ -304,7 +304,7 @@ bool InspIRCd::BindSocket(int sockfd, insp_sockaddr client, insp_sockaddr server if (!*addr) { #ifdef IPV6 - memcpy(&addy, &server.sin6_addr, sizeof(in6_addr)); + memcpy(&server.sin6_addr, INADDR6_ANY, sizeof(INADDR6_ANY)); #else server.sin_addr.s_addr = htonl(INADDR_ANY); #endif @@ -312,7 +312,7 @@ bool InspIRCd::BindSocket(int sockfd, insp_sockaddr client, insp_sockaddr server else { #ifdef IPV6 - memcpy(&addy, &server.sin6_addr, sizeof(in6_addr)); + memcpy(&server.sin6_addr, &addy, sizeof(in6_addr)); #else server.sin_addr = addy; #endif |