summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2015-05-13 16:04:52 +0200
committerAttila Molnar <attilamolnar@hush.com>2015-05-13 16:04:52 +0200
commit06bc8df45045a3d1fdc45f793abf7ba72b7403b1 (patch)
treecd19e634e95b714da0fe65c9803a506681904f94
parentcc007f8a3baa92ac46f17457a9a321e9b6530ded (diff)
parentc0ae500d03a30f71c654d5bdf1a835ba6e020d12 (diff)
Merge pull request #1041 from SaberUK/master+ipv6-nameserver
Fix IPv6 nameservers not being detected by the resolv.conf parser.
-rw-r--r--src/coremods/core_dns.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/coremods/core_dns.cpp b/src/coremods/core_dns.cpp
index e1494b7f3..01e911efb 100644
--- a/src/coremods/core_dns.cpp
+++ b/src/coremods/core_dns.cpp
@@ -739,7 +739,7 @@ class ModuleDNS : public Module
if (DNSServer == "nameserver")
{
resolv >> DNSServer;
- if (DNSServer.find_first_not_of("0123456789.") == std::string::npos)
+ if (DNSServer.find_first_not_of("0123456789.") == std::string::npos || DNSServer.find_first_not_of("0123456789ABCDEFabcdef:") == std::string::npos)
{
ServerInstance->Logs->Log("CONFIG", LOG_DEFAULT, "<dns:server> set to '%s' as first resolver in /etc/resolv.conf.",DNSServer.c_str());
return;