summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/dns.c
diff options
context:
space:
mode:
authorTodd T. Fries <todd@cvs.openbsd.org>2011-03-09 00:35:43 +0000
committerTodd T. Fries <todd@cvs.openbsd.org>2011-03-09 00:35:43 +0000
commit39598284ddb4e3dd45ae0be32bc51e0733a06906 (patch)
tree9a32c4354761e1058cf973f0fae5f9fba84e1a1d /usr.sbin/smtpd/dns.c
parentcfb8b447cbbb867ed9d7717f7ef1357d6154ebd6 (diff)
make similar code .. more similar
ok gilles@ previous commit should have read: when copying 'struct sockaddr' data, use sa_len not sizeof(struct sockaddr_in) this fixes truncation of IPv6 addresses in the mail delivery path ok gilles@
Diffstat (limited to 'usr.sbin/smtpd/dns.c')
-rw-r--r--usr.sbin/smtpd/dns.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/dns.c b/usr.sbin/smtpd/dns.c
index 6752171455f..9a6358a1a09 100644
--- a/usr.sbin/smtpd/dns.c
+++ b/usr.sbin/smtpd/dns.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dns.c,v 1.29 2011/03/09 00:34:01 todd Exp $ */
+/* $OpenBSD: dns.c,v 1.30 2011/03/09 00:35:42 todd Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -235,8 +235,8 @@ dns_asr_handler(int fd, short event, void *arg)
if (ret == ASR_YIELD) {
free(ar.ar_cname);
- query->error = 0;
memcpy(&query->ss, &ar.ar_sa.sa, ar.ar_sa.sa.sa_len);
+ query->error = 0;
imsg_compose_event(query->asker, IMSG_DNS_HOST, 0, 0, -1, query,
sizeof(*query));
dns_asr_handler(-1, -1, dnssession);