summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2004-09-04 00:30:53 +0000
committerStef Walter <stef@memberwebs.com>2004-09-04 00:30:53 +0000
commit2c1e356c9434b4419274496907413ad5186abebd (patch)
tree63c1caae3c19d54523f724ee3ce9d3358e7e13fb /common
parent86e6b10005f11d4cb97e2a836f849a99f0fe07ed (diff)
Fix FreeBSD transparent proxy code
Diffstat (limited to 'common')
-rw-r--r--common/smtppass.c4
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";
}