diff -up mtr-0.84/dns.c.mixed mtr-0.84/dns.c --- mtr-0.84/dns.c.mixed 2013-06-06 18:56:19.360247890 +0200 +++ mtr-0.84/dns.c 2013-06-06 18:58:09.804233105 +0200 @@ -938,6 +938,8 @@ void dorequest(char *s,int type,word id) hp->id = id; /* htons() deliberately left out (redundant) */ #ifdef ENABLE_IPV6 for (i = 0;i < NSCOUNT6;i++) { + if (!NSSOCKADDR6(i)) + continue; if (NSSOCKADDR6(i)->sin6_family == AF_INET6) (void)sendto(resfd6,buf,r,0,(struct sockaddr *) NSSOCKADDR6(i), sizeof(struct sockaddr_in6)); @@ -1336,6 +1338,8 @@ void dns_ack6(void) if ( addrcmp( (void *) &(from6->sin6_addr), (void *) &localhost6, (int) AF_INET6 ) == 0 ) { for (i = 0;i < NSCOUNT6;i++) { + if (!NSSOCKADDR6(i)) + continue; if ( addrcmp( (void *) &(NSSOCKADDR6(i)->sin6_addr), (void *) &(from6->sin6_addr), (int) AF_INET6 ) == 0 || addrcmp( (void *) &(NSSOCKADDR6(i)->sin6_addr), @@ -1344,6 +1348,8 @@ void dns_ack6(void) } } else for (i = 0;i < NSCOUNT6;i++) { + if (!NSSOCKADDR6(i)) + continue; if ( addrcmp( (void *) &(NSSOCKADDR6(i)->sin6_addr), (void *) &(from6->sin6_addr), AF_INET6 ) == 0 ) break;