diff options
author | Wolfgang Breyha <wbreyha@gmx.net> | 2020-01-07 13:03:18 +0000 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2020-01-07 13:03:18 +0000 |
commit | 67794d2b830fc580f87b0635718d95e32b467be1 (patch) | |
tree | 0c18e4d3e30ea5ed49da4dd1bf5bbf7aeea2de6b /src | |
parent | ccbb15c9d7d7cac10228311aa1c7e448343a345d (diff) |
SPF: fix result for case of only non-spf TXT RRs. Bug 2499
Diffstat (limited to 'src')
-rw-r--r-- | src/src/spf.c | 7 |
1 files changed, 6 insertions, 1 deletions
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; |