diff options
author | Darren Tucker <dtucker@cvs.openbsd.org> | 2016-01-29 02:54:46 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@cvs.openbsd.org> | 2016-01-29 02:54:46 +0000 |
commit | 4dd606a582e55d90521160840db15e0c0d4295af (patch) | |
tree | ace1573c486ba301212429701781803681b5f092 /usr.bin/ssh/servconf.c | |
parent | 3a28ff64c2b3187e00d4a53255a62ce7c93c3452 (diff) |
Allow RekeyLimits in excess of 4G up to 2**63 bits (limited by the return
type of scan_scaled). Part of bz#2521, ok djm.
Diffstat (limited to 'usr.bin/ssh/servconf.c')
-rw-r--r-- | usr.bin/ssh/servconf.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/usr.bin/ssh/servconf.c b/usr.bin/ssh/servconf.c index 1457ddd206f..a51b6f12f69 100644 --- a/usr.bin/ssh/servconf.c +++ b/usr.bin/ssh/servconf.c @@ -1,5 +1,5 @@ -/* $OpenBSD: servconf.c,v 1.283 2015/11/13 04:38:06 djm Exp $ */ +/* $OpenBSD: servconf.c,v 1.284 2016/01/29 02:54:45 dtucker Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland * All rights reserved @@ -1278,16 +1278,12 @@ process_server_config_line(ServerOptions *options, char *line, if (scan_scaled(arg, &val64) == -1) fatal("%.200s line %d: Bad number '%s': %s", filename, linenum, arg, strerror(errno)); - /* check for too-large or too-small limits */ - if (val64 > UINT_MAX) - fatal("%.200s line %d: RekeyLimit too large", - filename, linenum); if (val64 != 0 && val64 < 16) fatal("%.200s line %d: RekeyLimit too small", filename, linenum); } if (*activep && options->rekey_limit == -1) - options->rekey_limit = (u_int32_t)val64; + options->rekey_limit = val64; if (cp != NULL) { /* optional rekey interval present */ if (strcmp(cp, "none") == 0) { (void)strdelim(&cp); /* discard */ @@ -2304,7 +2300,7 @@ dump_config(ServerOptions *o) printf("ipqos %s ", iptos2str(o->ip_qos_interactive)); printf("%s\n", iptos2str(o->ip_qos_bulk)); - printf("rekeylimit %lld %d\n", (long long)o->rekey_limit, + printf("rekeylimit %llu %d\n", (unsigned long long)o->rekey_limit, o->rekey_interval); channel_print_adm_permitted_opens(); |