summaryrefslogtreecommitdiff
path: root/src/coremods
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2015-05-10 04:36:38 +0100
committerPeter Powell <petpow@saberuk.com>2015-05-10 04:36:38 +0100
commitc0ae500d03a30f71c654d5bdf1a835ba6e020d12 (patch)
treebf5586bde139835319a62a5189fb7be104786a67 /src/coremods
parent4711113dff7fc33c96f95f417f2813f28c690e01 (diff)
Fix IPv6 nameservers not being detected by the resolv.conf parser.
This fixes #973. Forward port of #974.
Diffstat (limited to 'src/coremods')
-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 829351f04..b332368fc 100644
--- a/src/coremods/core_dns.cpp
+++ b/src/coremods/core_dns.cpp
@@ -717,7 +717,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;