}
} else {
struct in6_addr tmpbuf;
- if (inet_pton(AF_INET6, rr.content.c_str(), &tmpbuf) != 1 || rr.content.find('.') != string::npos) {
+ if (inet_pton(AF_INET6, rr.content.c_str(), &tmpbuf) != 1) {
cout<<"[Warning] Following record is not a valid IPv6 address: "<<rr.qname<<" IN " <<rr.qtype.toString()<< " '" << rr.content<<"'"<<endl;
numwarnings++;
}
}
else {
struct in6_addr tmpbuf{};
- if (inet_pton(AF_INET6, content.c_str(), &tmpbuf) != 1 || content.find('.') != string::npos) {
+ if (inet_pton(AF_INET6, content.c_str(), &tmpbuf) != 1) {
throw std::runtime_error("Invalid IPv6 address");
}
}