Skip to content

Commit

Permalink
Fix #76
Browse files Browse the repository at this point in the history
  • Loading branch information
José Borges Ferreira committed Aug 7, 2020
1 parent 3c54545 commit f450f11
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions smf-spf.c
Original file line number Diff line number Diff line change
Expand Up @@ -848,10 +848,9 @@ static sfsistat smf_connect(SMFICTX *ctx, char *name, _SOCK_ADDR *sa) {
smfi_setpriv(ctx, context);
if (conf.ipnats && (d_ip = natip_check(inet_addr(host)))) {
snprintf(context->addr, sizeof(context->addr), "%li.%li.%li.%li",
d_ip >> 24 & 0xff, d_ip >> 16 & 0xff, d_ip >> 8 & 0xff, d_ip & 0xff);
d_ip & 0xff, d_ip >> 8 & 0xff, d_ip >> 16 & 0xff, d_ip >> 24 & 0xff);
log_message(LOG_INFO, "Found NAT IP address. Original: %s . Final %li (%s)", host, d_ip,context->addr);
}
if (conf.fixed_ip)
} else if (conf.fixed_ip)
strscpy(context->addr, conf.fixed_ip, sizeof(context->addr) - 1);
else
strscpy(context->addr, host, sizeof(context->addr) - 1);
Expand Down

0 comments on commit f450f11

Please sign in to comment.