diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-11-01 17:32:19 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-11-01 17:32:19 +0000 |
commit | 73de881eafbd3d201ce4be472bd35349773d74bd (patch) | |
tree | 1c0968f9ee4fce1adc71895ff621cac8908d77c2 /src/modules/m_cloaking.cpp | |
parent | bfe4bf12b1a185b9903921295696ec1ce4642f57 (diff) |
Merge commit 'ddg/out-12'
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10778 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_cloaking.cpp')
-rw-r--r-- | src/modules/m_cloaking.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index 761f37c18..58de93da9 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -418,8 +418,10 @@ class ModuleCloaking : public Module #ifdef IPV6 in6_addr testaddr; in_addr testaddr2; - if ((dest->GetProtocolFamily() == AF_INET6) && (inet_pton(AF_INET6,dest->host.c_str(),&testaddr) < 1) && (hostcloak.length() <= 64)) - /* Invalid ipv6 address, and ipv6 user (resolved host) */ + if ((dest->GetProtocolFamily() == AF_INET6) && + (inet_pton(AF_INET6,dest->host.c_str(),&testaddr) < 1) && + (inet_aton(dest->host.c_str(),&testaddr2) < 1) && (hostcloak.length() <= 64)) + /* Invalid ipv4/ipv6 address, and ipv6 user (resolved host) */ b = hostcloak; else if ((dest->GetProtocolFamily() == AF_INET) && (inet_aton(dest->host.c_str(),&testaddr2) < 1) && (hostcloak.length() <= 64)) /* Invalid ipv4 address, and ipv4 user (resolved host) */ |