diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2017-10-20 09:48:38 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2017-10-20 09:53:56 +0300 |
commit | 04a44fafaa2baf0be206a457febca5540b7e3f4a (patch) | |
tree | f3356546d95a6591fbb961e5febf67cc9d5f6351 /src/builtin/dns.bi | |
parent | 1307a40117e0c4d4d96b7720537dc30a217af681 (diff) | |
download | mailfromd-04a44fafaa2baf0be206a457febca5540b7e3f4a.tar.gz mailfromd-04a44fafaa2baf0be206a457febca5540b7e3f4a.tar.bz2 |
Drop ttl tracking from DNS API; drop SPF caching
* lib/dns.c: Remove ttl tracking.
* lib/dns.h: Fix prototypes.
* mflib/spf.mf: Remove caching.
* src/builtin/spf.bi (spf_ttl): Remove variable.
* src/builtin/dns.bi: Update calls to DNS API.
* src/spf.c: Likewise.
* src/spf.h (spf_answer_t): Remove ttl.
Diffstat (limited to 'src/builtin/dns.bi')
-rw-r--r-- | src/builtin/dns.bi | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/builtin/dns.bi b/src/builtin/dns.bi index faf8998d..137cccc8 100644 --- a/src/builtin/dns.bi +++ b/src/builtin/dns.bi @@ -73,11 +73,10 @@ ipaddr_cmp(const void *a, const void *b) MF_DEFUN(dns_getaddr, STRING, STRING string) { size_t i; - unsigned long ttl; dns_status dnstat; struct dns_reply r; - dnstat = a_lookup(string, &r, &ttl); + dnstat = a_lookup(string, &r); switch (dnstat) { case dns_success: { MF_OBSTACK_BEGIN(); @@ -115,14 +114,13 @@ MF_DEFUN(dns_getname, STRING, STRING ipstr) { dns_status dnstat; struct in_addr addr; - unsigned long ttl; struct dns_reply r; MF_ASSERT(inet_aton(ipstr, &addr), mfe_invip, _("invalid IP: %s"), ipstr); - dnstat = ptr_lookup(addr, &r, &ttl); + dnstat = ptr_lookup(addr, &r); switch (dnstat) { case dns_success: { size_t i; @@ -297,7 +295,7 @@ END MF_DEFUN(ptr_validate, NUMBER, STRING s) { int rc, res; - switch (rc = ptr_validate(s, NULL, NULL, NULL)) { + switch (rc = ptr_validate(s, NULL, NULL)) { case dns_success: res = 1; break; |