simon-git: putty (master): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Sat Jan 26 16:25:23 GMT 2019


TL;DR:
  68c47ac4 Fix handling of max_data_size == 0.

Repository:     https://git.tartarus.org/simon/putty.git
On the web:     https://git.tartarus.org/?p=simon/putty.git
Branch updated: master
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2019-01-26 16:25:23

commit 68c47ac470d186e3f076c5f4ddfb4d7bcddda855
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=68c47ac470d186e3f076c5f4ddfb4d7bcddda855;hp=1ae1b1a4ce090eb4ced62673fb7aeca4e7054992
Author: Simon Tatham <anakin at pobox.com>
Date:   Sat Jan 26 16:16:19 2019 +0000

    Fix handling of max_data_size == 0.
    
    When I reworked the support for rekeying after a certain amount of
    data had been sent, I forgot the part where configuring the max data
    limit to zero means 'never rekey due to data transfer volume'. So I
    was incautiously checking the 'running' flag in the new
    DataTransferStats to find out whether we needed to rekey, forgetting
    that sometimes running=false means the transfer limit has expired, and
    sometimes it means there never was one in the first place.
    
    To fix this, I've got rid of the boolean return value from DTS_CONSUME
    and turned it into an 'expired' flag in DataTransferStats, separate
    from the 'running' flag. Now everything consistently checks 'expired'
    to find out whether to rekey, and there's a new reset function that
    reliably clears 'expired' but sets 'running' depending on whether the
    size is nonzero.
    
    (Also, while I'm at it, I've turned the DTS_CONSUME macro into an
    inline function, because that's becoming my general preference now
    that C99 is allowed in this code base.)

 ssh2bpp.c       |  5 ++---
 ssh2transport.c | 23 +++++++++--------------
 sshbpp.h        | 46 ++++++++++++++++++++++++++++++++++------------
 3 files changed, 45 insertions(+), 29 deletions(-)



More information about the tartarus-commits mailing list