# HG changeset patch # User Carl Byington # Date 1493159211 25200 # Node ID 7431e948b5c3fc2f9d6deb300eba9d0cdacfdb67 # Parent 16451edcb962ebf8236b587ce1bb33880fcda489 spf code now handles mx,exists,ptr tags, multiple A records, %{i} macro diff -r 16451edcb962 -r 7431e948b5c3 src/context.cpp --- 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;