version 1.243, 2016/10/11 21:47:45 |
version 1.244, 2017/02/03 02:56:00 |
|
|
|
|
/* Time-based rekeying */ |
/* Time-based rekeying */ |
if (state->rekey_interval != 0 && |
if (state->rekey_interval != 0 && |
state->rekey_time + state->rekey_interval <= monotime()) |
(int64_t)state->rekey_time + state->rekey_interval <= monotime()) |
return 1; |
return 1; |
|
|
/* Always rekey when MAX_PACKETS sent in either direction */ |
/* Always rekey when MAX_PACKETS sent in either direction */ |
|
|
} |
} |
|
|
void |
void |
ssh_packet_set_rekey_limits(struct ssh *ssh, u_int64_t bytes, time_t seconds) |
ssh_packet_set_rekey_limits(struct ssh *ssh, u_int64_t bytes, u_int32_t seconds) |
{ |
{ |
debug3("rekey after %llu bytes, %d seconds", (unsigned long long)bytes, |
debug3("rekey after %llu bytes, %u seconds", (unsigned long long)bytes, |
(int)seconds); |
(unsigned int)seconds); |
ssh->state->rekey_limit = bytes; |
ssh->state->rekey_limit = bytes; |
ssh->state->rekey_interval = seconds; |
ssh->state->rekey_interval = seconds; |
} |
} |