diff options
Diffstat (limited to 'packet.c')
-rw-r--r-- | packet.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: packet.c,v 1.186 2013/05/17 00:13:13 djm Exp $ */ | 1 | /* $OpenBSD: packet.c,v 1.187 2013/06/01 13:15:52 dtucker Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -1015,7 +1015,7 @@ packet_send2(void) | |||
1015 | /* after a NEWKEYS message we can send the complete queue */ | 1015 | /* after a NEWKEYS message we can send the complete queue */ |
1016 | if (type == SSH2_MSG_NEWKEYS) { | 1016 | if (type == SSH2_MSG_NEWKEYS) { |
1017 | active_state->rekeying = 0; | 1017 | active_state->rekeying = 0; |
1018 | active_state->rekey_time = time(NULL); | 1018 | active_state->rekey_time = monotime(); |
1019 | while ((p = TAILQ_FIRST(&active_state->outgoing))) { | 1019 | while ((p = TAILQ_FIRST(&active_state->outgoing))) { |
1020 | type = p->type; | 1020 | type = p->type; |
1021 | debug("dequeue packet: %u", type); | 1021 | debug("dequeue packet: %u", type); |
@@ -1942,7 +1942,7 @@ packet_need_rekeying(void) | |||
1942 | (active_state->max_blocks_in && | 1942 | (active_state->max_blocks_in && |
1943 | (active_state->p_read.blocks > active_state->max_blocks_in)) || | 1943 | (active_state->p_read.blocks > active_state->max_blocks_in)) || |
1944 | (active_state->rekey_interval != 0 && active_state->rekey_time + | 1944 | (active_state->rekey_interval != 0 && active_state->rekey_time + |
1945 | active_state->rekey_interval <= time(NULL)); | 1945 | active_state->rekey_interval <= monotime()); |
1946 | } | 1946 | } |
1947 | 1947 | ||
1948 | void | 1948 | void |
@@ -1956,7 +1956,7 @@ packet_set_rekey_limits(u_int32_t bytes, time_t seconds) | |||
1956 | * We set the time here so that in post-auth privsep slave we count | 1956 | * We set the time here so that in post-auth privsep slave we count |
1957 | * from the completion of the authentication. | 1957 | * from the completion of the authentication. |
1958 | */ | 1958 | */ |
1959 | active_state->rekey_time = time(NULL); | 1959 | active_state->rekey_time = monotime(); |
1960 | } | 1960 | } |
1961 | 1961 | ||
1962 | time_t | 1962 | time_t |
@@ -1965,7 +1965,7 @@ packet_get_rekey_timeout(void) | |||
1965 | time_t seconds; | 1965 | time_t seconds; |
1966 | 1966 | ||
1967 | seconds = active_state->rekey_time + active_state->rekey_interval - | 1967 | seconds = active_state->rekey_time + active_state->rekey_interval - |
1968 | time(NULL); | 1968 | monotime(); |
1969 | return (seconds <= 0 ? 1 : seconds); | 1969 | return (seconds <= 0 ? 1 : seconds); |
1970 | } | 1970 | } |
1971 | 1971 | ||