summaryrefslogtreecommitdiff
path: root/src/inspsocket.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-04 15:16:37 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-04 15:16:37 +0000
commit2820565ea35791a45b0f897b3c15e9c4527d6d67 (patch)
tree54cf44e906a1f9ac18780849a796308dabaa0bef /src/inspsocket.cpp
parent425e2a649005beb72a258ddde76b56b0ffd15e40 (diff)
Fixes for ::0 ip's, disable autobind when using ::ffff: etc
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4703 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspsocket.cpp')
-rw-r--r--src/inspsocket.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp
index f738835a8..17268dc78 100644
--- a/src/inspsocket.cpp
+++ b/src/inspsocket.cpp
@@ -215,14 +215,17 @@ bool InspSocket::DoConnect()
return false;
}
- if (!this->BindAddr())
- return false;
+ if ((strstr(this->IP,"::ffff:") != (char*)&this->IP) && (strstr(this->IP,"::FFFF:") != (char*)&this->IP))
+ {
+ if (!this->BindAddr())
+ return false;
+ }
log(DEBUG,"Part 2 DoConnect() %s",this->IP);
insp_aton(this->IP,&addy);
#ifdef IPV6
addr.sin6_family = AF_FAMILY;
- memcpy(&addy, &addr.sin6_addr, sizeof(insp_inaddr));
+ memcpy(&addr.sin6_addr, &addy, sizeof(insp_inaddr));
addr.sin6_port = htons(this->port);
#else
addr.sin_family = AF_FAMILY;