changeset 416:7431e948b5c3

spf code now handles mx,exists,ptr tags, multiple A records, %{i} macro
author Carl Byington <carl@five-ten-sg.com>
date Tue, 25 Apr 2017 15:26:51 -0700
parents 16451edcb962
children d1976e04f5ba
files src/context.cpp
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/context.cpp	Tue Apr 25 15:23:33 2017 -0700
+++ b/src/context.cpp	Tue Apr 25 15:26:51 2017 -0700
@@ -1212,7 +1212,7 @@
                         uint32_t *a = (uint32_t *)buf;
                         size_t c = a[0];
                         for (size_t i=1; i<=c; i++) {
-                            ipy = ntohl(a[i]);
+                            uint32_t ipy = ntohl(a[i]);
                             if (ipy == ip) {
                                 log(priv->queueid, "match mx:%s", name);
                                 return true;
@@ -1224,11 +1224,11 @@
                 else if (p[0] == 'a') {
                     const char *name = (p[1] == ':') ? p+2 : from;
                     char buf[maxlen];
-                    uint32_t ipy = ntohl(dns_interface(*priv, name, ns_t_a, false, NULL, buf, maxlen));
+                    dns_interface(*priv, name, ns_t_a, false, NULL, buf, maxlen);
                     uint32_t *a = (uint32_t *)buf;
                     size_t c = a[0];
                     for (size_t i=1; i<=c; i++) {
-                        ipy = ntohl(a[i]);
+                        uint32_t ipy = ntohl(a[i]);
                         if (ipy == ip) {
                             log(priv->queueid, "match a:%s", name);
                             return true;