aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/spf.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2022-08-26 22:14:24 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2022-08-26 22:31:00 +0100
commit21694b896193c6ebb7a7d554e91524c1007afd36 (patch)
tree3492e74a78816bc4a2e5b296a619422adfc7db6b /src/libserver/spf.c
parentfffaeeb09797da3dffd15cae400276019ed611f6 (diff)
downloadrspamd-21694b896193c6ebb7a7d554e91524c1007afd36.tar.gz
rspamd-21694b896193c6ebb7a7d554e91524c1007afd36.zip
[Minor] SPF: Fix debugging domain
Diffstat (limited to 'src/libserver/spf.c')
-rw-r--r--src/libserver/spf.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/libserver/spf.c b/src/libserver/spf.c
index 29780dce5..8f7a596d9 100644
--- a/src/libserver/spf.c
+++ b/src/libserver/spf.c
@@ -975,14 +975,15 @@ spf_record_dns_callback (struct rdns_reply *reply, gpointer arg)
break;
case SPF_RESOLVE_INCLUDE:
if (elt_data->type == RDNS_REQUEST_TXT) {
- if (reply->entries) {
+ struct rdns_reply_entry *selected = NULL;
+
+ cb->addr->flags |= RSPAMD_SPF_FLAG_RESOLVED;
+ spf_process_txt_record (rec, cb->resolved, reply, &selected);
+ if (selected) {
msg_debug_spf ("got include record for %s: '%s'",
req_name->name,
- reply->entries[0].content.txt.data);
+ selected->content.txt.data);
}
-
- cb->addr->flags |= RSPAMD_SPF_FLAG_RESOLVED;
- spf_process_txt_record (rec, cb->resolved, reply, NULL);
}
goto end;