Merge pull request #1041 from SaberUK/master+ipv6-nameserver

Fix IPv6 nameservers not being detected by the resolv.conf parser.
This commit is contained in:
Attila Molnar 2015-05-13 16:04:52 +02:00
commit 06bc8df450

View File

@ -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;