changeset 398:74baa26dbe7a stable-6-0-52-2

only ntohl() once during recursive spf txt processing
author Carl Byington <carl@five-ten-sg.com>
date Tue, 07 Mar 2017 16:52:47 -0800
parents d08da4b058e8
children 7e670e59d59d
files src/context.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/context.cpp	Tue Mar 07 16:49:49 2017 -0800
+++ b/src/context.cpp	Tue Mar 07 16:52:47 2017 -0800
@@ -1214,7 +1214,7 @@
         if (st == token_require_signed) {
             // not signed by a required signer, but maybe passes strong spf check
             // only check spf if the list of required signers is not a single blank.
-            if (strcmp(dk->signer, " ") && resolve_spf(from, priv->ip, priv)) {
+            if (strcmp(dk->signer, " ") && resolve_spf(from, ntohl(priv->ip), priv)) {
                 log(queueid, "spf pass for %s rather than required dkim signer", from);
                 return token_white;
             }