Implemented client IP logging

This commit is contained in:
Nicola Ruggero
2010-11-04 12:14:03 +01:00
parent 87297c5014
commit d797b2cf49
13 changed files with 125 additions and 14 deletions
+11
View File
@@ -265,6 +265,17 @@ scp_v0s_accept(struct SCP_CONNECTION* c, struct SCP_SESSION** s, int skipVchk)
scp_session_set_directory(session, buf);
}
}
if (s_check_rem(c->in_s, 2))
{
/* reading client IP address */
in_uint16_be(c->in_s, sz);
if (sz > 0)
{
in_uint8a(c->in_s, buf, sz);
buf[sz] = '\0';
scp_session_set_client_ip(session, buf);
}
}
}
else
{