From ca215635bea432e83bb797e063da9b34103d29c6 Mon Sep 17 00:00:00 2001 From: Daniel De Graaf Date: Sat, 24 Apr 2010 17:28:48 -0500 Subject: Emulate a bug in 1.2 to get matching cloaks --- src/modules/m_cloaking.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index 1b46bb75e..70f335c1c 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -485,8 +485,8 @@ class ModuleCloaking : public Module { std::string tail = LastTwoDomainParts(host); - /* Generate a cloak using specialized Hash */ - chost = prefix + "-" + Hash->sumIV(compatkey, xtab[(dest->host[0]) % 4], dest->host).substr(0,8) + tail; + // xtab is not used here due to a bug in 1.2 cloaking + chost = prefix + "-" + Hash->sumIV(compatkey, "0123456789abcdef", host).substr(0,8) + tail; /* Fix by brain - if the cloaked host is > the max length of a host (64 bytes * according to the DNS RFC) then they get cloaked as an IP. -- cgit v1.2.3