diff options
author | dtucker@openbsd.org <dtucker@openbsd.org> | 2016-01-29 03:54:45 +0100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2016-01-30 01:19:13 +0100 |
commit | 921ff00b0ac429666fb361d2d6cb1c8fff0006cb (patch) | |
tree | 555f5a0348185ea84bdf43a298d8811390233cc7 /readconf.c | |
parent | upstream commit (diff) | |
download | openssh-921ff00b0ac429666fb361d2d6cb1c8fff0006cb.tar.xz openssh-921ff00b0ac429666fb361d2d6cb1c8fff0006cb.zip |
upstream commit
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.
Upstream-ID: 13bea82be566b9704821b1ea05bf7804335c7979
Diffstat (limited to 'readconf.c')
-rw-r--r-- | readconf.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/readconf.c b/readconf.c index 8e9a25da7..2a5620479 100644 --- a/readconf.c +++ b/readconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: readconf.c,v 1.248 2016/01/14 16:17:40 markus Exp $ */ +/* $OpenBSD: readconf.c,v 1.249 2016/01/29 02:54:45 dtucker Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -976,16 +976,12 @@ parse_time: 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 (s != NULL) { /* optional rekey interval present */ if (strcmp(s, "none") == 0) { (void)strdelim(&s); /* discard */ @@ -2436,8 +2432,8 @@ dump_client_config(Options *o, const char *host) printf("%s\n", iptos2str(o->ip_qos_bulk)); /* oRekeyLimit */ - printf("rekeylimit %lld %d\n", - (long long)o->rekey_limit, o->rekey_interval); + printf("rekeylimit %llu %d\n", + (unsigned long long)o->rekey_limit, o->rekey_interval); /* oStreamLocalBindMask */ printf("streamlocalbindmask 0%o\n", |