From a8f19f7a62ab1ff8b6b7836d3a6fc776c61a27b9 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 11 Nov 2014 17:13:25 +0000 Subject: [PATCH] Set AF properly in one more place. --- src/libutil/upstream.c | 2 ++ 1 file changed, 2 insertions(+) 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); } -- 2.39.5