aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-11-11 17:13:25 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-11-11 17:13:25 +0000
commita8f19f7a62ab1ff8b6b7836d3a6fc776c61a27b9 (patch)
treee6e40c91b147d17998f52ef735e4312604510955
parente3aafd4a74704ff7ca5c8c81b064c634f71fc3c4 (diff)
downloadrspamd-a8f19f7a62ab1ff8b6b7836d3a6fc776c61a27b9.tar.gz
rspamd-a8f19f7a62ab1ff8b6b7836d3a6fc776c61a27b9.zip
Set AF properly in one more place.
-rw-r--r--src/libutil/upstream.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libutil/upstream.c b/src/libutil/upstream.c
index 5314a8ffa..b164577c6 100644
--- a/src/libutil/upstream.c
+++ b/src/libutil/upstream.c
@@ -168,6 +168,7 @@ rspamd_upstream_dns_cb (struct rdns_reply *reply, void *arg)
up_ent->addr.addr.s4.sin_addr = entry->content.a.addr;
up_ent->addr.af = AF_INET;
+ up_ent->addr.addr.sa.sa_family = AF_INET;
up_ent->addr.slen = sizeof (up_ent->addr.addr.s4);
LL_PREPEND (up->new_addrs, up_ent);
}
@@ -177,6 +178,7 @@ rspamd_upstream_dns_cb (struct rdns_reply *reply, void *arg)
memcpy (&up_ent->addr.addr.s6.sin6_addr,
&entry->content.aaa.addr, sizeof (struct in6_addr));
up_ent->addr.af = AF_INET6;
+ up_ent->addr.addr.sa.sa_family = AF_INET6;
up_ent->addr.slen = sizeof (up_ent->addr.addr.s6);
LL_PREPEND (up->new_addrs, up_ent);
}