aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);
}