]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix IPv6 address handling in 6aaf7047297b739377e7d509cb914f32447fb281
authorAttila Molnar <attilamolnar@hush.com>
Sun, 6 Apr 2014 14:25:50 +0000 (16:25 +0200)
committerAttila Molnar <attilamolnar@hush.com>
Sun, 6 Apr 2014 14:25:50 +0000 (16:25 +0200)
src/cidr.cpp

index a4a252a48cefcc25acb10a7c82736b5bac835bdf..3338756655b6e8e5f2e42abe0c1545e90969ce00 100644 (file)
@@ -68,7 +68,7 @@ bool irc::sockets::MatchCIDR(const std::string &address, const std::string &cidr
        const std::string::size_type per_pos = cidr_copy.rfind('/');
        if ((per_pos == std::string::npos) || (per_pos == cidr_copy.length()-1)
                || (cidr_copy.find_first_not_of("0123456789", per_pos+1) != std::string::npos)
-               || (cidr_copy.find_first_not_of("0123456789.:") < per_pos))
+               || (cidr_copy.find_first_not_of("0123456789abcdef.:") < per_pos))
        {
                // The CIDR mask is invalid
                return false;