Fix DNSSEC crash retrying to IPv6 server.
diff --git a/src/forward.c b/src/forward.c
index c59777e..4dc3dca 100644
--- a/src/forward.c
+++ b/src/forward.c
@@ -278,7 +278,7 @@
blockdata_retrieve(forward->stash, forward->stash_len, (void *)header);
plen = forward->stash_len;
- if (forward->sentto->addr.sa.sa_family)
+ if (forward->sentto->addr.sa.sa_family == AF_INET)
log_query(F_DNSSEC | F_IPV4, "retry", (struct all_addr *)&forward->sentto->addr.in.sin_addr, "dnssec");
#ifdef HAVE_IPV6
else
@@ -299,7 +299,7 @@
while (sendto(fd, (char *)header, plen, 0,
&forward->sentto->addr.sa,
- sa_len(&forward->sentto->addr)) == -1 && retry_send());
+ sa_len(&forward->sentto->addr)) == -1 && retry_send());
return 1;
}