summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packet.c10
-rw-r--r--packet.h4
-rw-r--r--sshconnect2.c6
-rw-r--r--sshd.c4
4 files changed, 12 insertions, 12 deletions
diff --git a/packet.c b/packet.c
index ad1f6b497..6b9d3525b 100644
--- a/packet.c
+++ b/packet.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: packet.c,v 1.243 2016/10/11 21:47:45 djm Exp $ */ 1/* $OpenBSD: packet.c,v 1.244 2017/02/03 02:56:00 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
@@ -1049,7 +1049,7 @@ ssh_packet_need_rekeying(struct ssh *ssh, u_int outbound_packet_len)
1049 1049
1050 /* Time-based rekeying */ 1050 /* Time-based rekeying */
1051 if (state->rekey_interval != 0 && 1051 if (state->rekey_interval != 0 &&
1052 state->rekey_time + state->rekey_interval <= monotime()) 1052 (int64_t)state->rekey_time + state->rekey_interval <= monotime())
1053 return 1; 1053 return 1;
1054 1054
1055 /* Always rekey when MAX_PACKETS sent in either direction */ 1055 /* Always rekey when MAX_PACKETS sent in either direction */
@@ -2396,10 +2396,10 @@ ssh_packet_send_ignore(struct ssh *ssh, int nbytes)
2396} 2396}
2397 2397
2398void 2398void
2399ssh_packet_set_rekey_limits(struct ssh *ssh, u_int64_t bytes, time_t seconds) 2399ssh_packet_set_rekey_limits(struct ssh *ssh, u_int64_t bytes, u_int32_t seconds)
2400{ 2400{
2401 debug3("rekey after %llu bytes, %d seconds", (unsigned long long)bytes, 2401 debug3("rekey after %llu bytes, %u seconds", (unsigned long long)bytes,
2402 (int)seconds); 2402 (unsigned int)seconds);
2403 ssh->state->rekey_limit = bytes; 2403 ssh->state->rekey_limit = bytes;
2404 ssh->state->rekey_interval = seconds; 2404 ssh->state->rekey_interval = seconds;
2405} 2405}
diff --git a/packet.h b/packet.h
index bfe7da615..c33dd17df 100644
--- a/packet.h
+++ b/packet.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: packet.h,v 1.74 2016/10/11 21:47:45 djm Exp $ */ 1/* $OpenBSD: packet.h,v 1.75 2017/02/03 02:56:00 dtucker Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -154,7 +154,7 @@ int ssh_remote_port(struct ssh *);
154const char *ssh_local_ipaddr(struct ssh *); 154const char *ssh_local_ipaddr(struct ssh *);
155int ssh_local_port(struct ssh *); 155int ssh_local_port(struct ssh *);
156 156
157void ssh_packet_set_rekey_limits(struct ssh *, u_int64_t, time_t); 157void ssh_packet_set_rekey_limits(struct ssh *, u_int64_t, u_int32_t);
158time_t ssh_packet_get_rekey_timeout(struct ssh *); 158time_t ssh_packet_get_rekey_timeout(struct ssh *);
159 159
160void *ssh_packet_get_input(struct ssh *); 160void *ssh_packet_get_input(struct ssh *);
diff --git a/sshconnect2.c b/sshconnect2.c
index dd47b75d3..2abb86679 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect2.c,v 1.253 2017/01/30 00:32:28 djm Exp $ */ 1/* $OpenBSD: sshconnect2.c,v 1.254 2017/02/03 02:56:00 dtucker Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * Copyright (c) 2008 Damien Miller. All rights reserved. 4 * Copyright (c) 2008 Damien Miller. All rights reserved.
@@ -193,8 +193,8 @@ ssh_kex2(char *host, struct sockaddr *hostaddr, u_short port)
193 } 193 }
194 194
195 if (options.rekey_limit || options.rekey_interval) 195 if (options.rekey_limit || options.rekey_interval)
196 packet_set_rekey_limits((u_int32_t)options.rekey_limit, 196 packet_set_rekey_limits(options.rekey_limit,
197 (time_t)options.rekey_interval); 197 options.rekey_interval);
198 198
199 /* start key exchange */ 199 /* start key exchange */
200 if ((r = kex_setup(active_state, myproposal)) != 0) 200 if ((r = kex_setup(active_state, myproposal)) != 0)
diff --git a/sshd.c b/sshd.c
index 1dc4d182a..48fd64f3d 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshd.c,v 1.480 2016/12/09 03:04:29 djm Exp $ */ 1/* $OpenBSD: sshd.c,v 1.481 2017/02/03 02:56:00 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
@@ -2154,7 +2154,7 @@ do_ssh2_kex(void)
2154 2154
2155 if (options.rekey_limit || options.rekey_interval) 2155 if (options.rekey_limit || options.rekey_interval)
2156 packet_set_rekey_limits(options.rekey_limit, 2156 packet_set_rekey_limits(options.rekey_limit,
2157 (time_t)options.rekey_interval); 2157 options.rekey_interval);
2158 2158
2159 myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = compat_pkalg_proposal( 2159 myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = compat_pkalg_proposal(
2160 list_hostkey_types()); 2160 list_hostkey_types());