comparison src/context.cpp @ 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 b48ee4bc431b
comparison
equal deleted inserted replaced
397:d08da4b058e8 398:74baa26dbe7a
1212 } 1212 }
1213 } 1213 }
1214 if (st == token_require_signed) { 1214 if (st == token_require_signed) {
1215 // not signed by a required signer, but maybe passes strong spf check 1215 // not signed by a required signer, but maybe passes strong spf check
1216 // only check spf if the list of required signers is not a single blank. 1216 // only check spf if the list of required signers is not a single blank.
1217 if (strcmp(dk->signer, " ") && resolve_spf(from, priv->ip, priv)) { 1217 if (strcmp(dk->signer, " ") && resolve_spf(from, ntohl(priv->ip), priv)) {
1218 log(queueid, "spf pass for %s rather than required dkim signer", from); 1218 log(queueid, "spf pass for %s rather than required dkim signer", from);
1219 return token_white; 1219 return token_white;
1220 } 1220 }
1221 char buf[maxlen]; 1221 char buf[maxlen];
1222 snprintf(buf, sizeof(buf), "Mail rejected - not dkim signed by %s", dk->signer); 1222 snprintf(buf, sizeof(buf), "Mail rejected - not dkim signed by %s", dk->signer);