Skip to content

Commit

Permalink
[Fix] Skip cname records when processing SPF records
Browse files Browse the repository at this point in the history
  • Loading branch information
vstakhov committed Aug 26, 2022
1 parent 21694b8 commit 379ed84
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/libserver/spf.c
Expand Up @@ -882,6 +882,11 @@ spf_record_dns_callback (struct rdns_reply *reply, gpointer arg)
rec->ttl = elt_data->ttl;
}

if (elt_data->type == RDNS_REQUEST_CNAME) {
/* Skip cname aliases - it must be handled by a recursor */
continue;
}

switch (cb->cur_action) {
case SPF_RESOLVE_MX:
if (elt_data->type == RDNS_REQUEST_MX) {
Expand Down Expand Up @@ -984,6 +989,10 @@ spf_record_dns_callback (struct rdns_reply *reply, gpointer arg)
req_name->name,
selected->content.txt.data);
}
else {
msg_debug_spf ("no include record for %s",
req_name->name);
}
}
goto end;

Expand Down

0 comments on commit 379ed84

Please sign in to comment.