Some small fixes.

Increased interval between onion key changes to 2 hours.
This commit is contained in:
irungentoo 2015-04-20 20:40:32 -04:00
parent 4a987bf751
commit e4ae993a80
No known key found for this signature in database
GPG Key ID: 10349DC9BED89E98
2 changed files with 3 additions and 3 deletions

View File

@ -87,7 +87,7 @@ static int proxy_http_generate_connection_request(TCP_Client_Connection *TCP_con
const int written = snprintf((char *)TCP_conn->last_packet, MAX_PACKET_SIZE, "%s%s:%hu%s%s:%hu%s", one, ip, port, two,
ip, port, three);
if (written < 0) {
if (written < 0 || MAX_PACKET_SIZE < written) {
return 0;
}

View File

@ -35,8 +35,8 @@
#define SEND_2 ONION_SEND_2
#define SEND_1 ONION_SEND_1
/* Change symmetric keys every hour to make paths expire eventually. */
#define KEY_REFRESH_INTERVAL (60 * 60)
/* Change symmetric keys every 2 hours to make paths expire eventually. */
#define KEY_REFRESH_INTERVAL (2 * 60 * 60)
static void change_symmetric_key(Onion *onion)
{
if (is_timeout(onion->timestamp, KEY_REFRESH_INTERVAL)) {