diff options
author | Stef Walter <stef@memberwebs.com> | 2004-09-04 00:30:53 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2004-09-04 00:30:53 +0000 |
commit | 727802f454745929b6cf425f6fed42fe2beadf02 (patch) | |
tree | 25038309ebb5e00c376db1b8908e13f24f1ada84 /common | |
parent | 028f34686603b2d981e782488b5e59ac74289279 (diff) |
Fix FreeBSD transparent proxy code
Diffstat (limited to 'common')
-rw-r--r-- | common/smtppass.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/common/smtppass.c b/common/smtppass.c index 14744f9..31b67ce 100644 --- a/common/smtppass.c +++ b/common/smtppass.c @@ -662,7 +662,7 @@ static int connect_out(clamsmtp_context_t* ctx) #ifdef LINUX_TRANSPARENT_PROXY if(getsockopt(ctx->client.fd, SOL_IP, SO_ORIGINAL_DST, &SANY_ADDR(addr), &SANY_LEN(addr)) == -1) #else - if(getsockname(ctx->client.fd, &SANY_ADDR(addr1), &SANY_LEN(addr1)) == -1) + if(getsockname(ctx->client.fd, &SANY_ADDR(addr), &SANY_LEN(addr)) == -1) #endif { message(ctx, LOG_ERR, "couldn't get source address for transparent proxying"); @@ -706,6 +706,8 @@ static int connect_out(clamsmtp_context_t* ctx) if(outaddr != &(g_state->outaddr)) { if(sock_any_ntop(outaddr, buf, MAXPATHLEN, 0) != -1) + outname = buf; + else outname = "unknown"; } |