summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-11-01 20:20:12 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-11-01 20:20:12 +0000
commit622a6b263a6c180bf9d1301efc2cb9378f743f11 (patch)
tree646e022bcbaf62564b2263988c899e37dab3be84 /src
parentab65273f9ff40c0761514d1067b6631ec5a0e422 (diff)
Add comments on Daniel's work
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10780 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/listensocket.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/listensocket.cpp b/src/listensocket.cpp
index 6fa6785bd..e4b568235 100644
--- a/src/listensocket.cpp
+++ b/src/listensocket.cpp
@@ -134,6 +134,18 @@ void ListenSocketBase::AcceptInternal()
else
ServerInstance->Logs->Log("SOCKET", DEBUG, "Can't get peername: %s", strerror(errno));
+ /*
+ * This case is the be all and end all patch to catch and nuke 4in6
+ * instead of special-casing shit all over the place and wreaking merry
+ * havoc with crap, instead, we just recreate sockaddr and strip ::ffff: prefix
+ * if it's a 4in6 IP.
+ *
+ * This is, of course, much improved over the older way of handling this
+ * (pretend it doesn't exist + hack around it -- yes, both were done!)
+ *
+ * Big, big thanks to danieldg for his work on this.
+ * -- w00t
+ */
static const unsigned char prefix4in6[12] = { 0,0,0,0, 0,0,0,0, 0,0,0xFF,0xFF };
if (!memcmp(prefix4in6, &((const sockaddr_in6*)client)->sin6_addr, 12))
{