summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Kelley <simon@thekelleys.org.uk>2014-03-21 11:13:55 +0000
committerSimon Kelley <simon@thekelleys.org.uk>2014-03-21 11:13:55 +0000
commit2b29191e7c6dcfd262997bdaf7bc8c6d539efa87 (patch)
treed0b75c844feec4f91960e1e972659207e3a3c460
parent03431d637301861ed13a4f5d7fc9be682bf28c71 (diff)
downloaddnsmasq-2b29191e7c6dcfd262997bdaf7bc8c6d539efa87.tar.gz
Fix DNSSEC crash retrying to IPv6 server.
-rw-r--r--src/forward.c4
1 files changed, 2 insertions, 2 deletions
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 @@ static int forward_query(int udpfd, union mysockaddr *udpaddr,
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 @@ static int forward_query(int udpfd, union mysockaddr *udpaddr,
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;
}