summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/smtppass.c4
-rw-r--r--src/clamsmtpd.c4
2 files changed, 6 insertions, 2 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";
}
diff --git a/src/clamsmtpd.c b/src/clamsmtpd.c
index 14744f9..31b67ce 100644
--- a/src/clamsmtpd.c
+++ b/src/clamsmtpd.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";
}