X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/ccbb15c9d7d7cac10228311aa1c7e448343a345d..67794d2b830fc580f87b0635718d95e32b467be1:/src/src/spf.c diff --git a/src/src/spf.c b/src/src/spf.c index 7671551bc..9b053ccf9 100644 --- a/src/src/spf.c +++ b/src/src/spf.c @@ -152,7 +152,12 @@ for (dns_record * rr = dns_next_rr(dnsa, &dnss, RESET_ANSWERS); rr; srr.rr[found++] = (void *) s; } -srr.num_rr = found; +/* Did we filter out all TXT RRs? Return NO_DATA instead of SUCCESS with +empty ANSWER section. */ + +if (!(srr.num_rr = found)) + srr.herrno = NO_DATA; + /* spfrr->rr must have been malloc()d for this */ SPF_dns_rr_dup(&spfrr, &srr); return spfrr;