return;
}
- if (strchr(x->IPAddr.c_str(),':'))
+#ifndef _WIN32
+ if (x->IPAddr.find('/') != std::string::npos)
+ {
+ struct stat sb;
+ if (stat(x->IPAddr.c_str(), &sb) == -1 || !S_ISSOCK(sb.st_mode))
+ ipvalid = false;
+ }
+#endif
+ if (x->IPAddr.find(':') != std::string::npos)
{
in6_addr n;
if (inet_pton(AF_INET6, x->IPAddr.c_str(), &n) < 1)
irc::sockets::sockaddrs bind;
if ((!x->Bind.empty()) && (irc::sockets::aptosa(x->Bind, 0, bind)))
{
- if (bind.sa.sa_family == AF_INET)
+ if (bind.family() == AF_INET)
start_type = DNS::QUERY_A;
}