]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
if we make an IPv6 address struct, make sure it has that family, and that the scope_i...
authorbert hubert <bert.hubert@netherlabs.nl>
Mon, 5 Jan 2015 11:46:50 +0000 (12:46 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Mon, 5 Jan 2015 11:46:50 +0000 (12:46 +0100)
pdns/misc.cc

index 7469119991963d8028af0c15a9e0efdd2656eb28..98cd8664330e3cc1c00dcc94dd8db66c9ced55ad 100644 (file)
@@ -680,7 +680,9 @@ int makeIPv6sockaddr(const std::string& addr, struct sockaddr_in6* ret)
     ourAddr.assign(addr.c_str() + 1, pos-1);
     port = atoi(addr.c_str()+pos+2);  
   }
-  
+  ret->sin6_scope_id=0;
+  ret->sin6_family=AF_INET6;
+
   if(inet_pton(AF_INET6, ourAddr.c_str(), (void*)&ret->sin6_addr) != 1) {
     struct addrinfo* res;
     struct addrinfo hints;