mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-03 20:42:48 -05:00
New system for tracking data-limit-based rekeys.
I've removed the encrypted_len fields from PktIn and PktOut, which were used to communicate from the BPP to ssh.c how much each packet contributed to the amount of data encrypted with a given set of cipher keys. It seems more sensible to have the BPP itself keep that counter - especially since only one of the three BPPs even needs to count it at all. So now there's a new DataTransferStats structure which the BPP updates, and ssh.c only needs to check it for overflow and reset the limits.
This commit is contained in:
2
ssh.h
2
ssh.h
@ -59,7 +59,6 @@ typedef struct PktIn {
|
||||
int refcount;
|
||||
int type;
|
||||
unsigned long sequence; /* SSH-2 incoming sequence number */
|
||||
long encrypted_len; /* for SSH-2 total-size counting */
|
||||
PacketQueueNode qnode; /* for linking this packet on to a queue */
|
||||
BinarySource_IMPLEMENTATION;
|
||||
} PktIn;
|
||||
@ -71,7 +70,6 @@ typedef struct PktOut {
|
||||
long minlen; /* SSH-2: ensure wire length is at least this */
|
||||
unsigned char *data; /* allocated storage */
|
||||
long maxlen; /* amount of storage allocated for `data' */
|
||||
long encrypted_len; /* for SSH-2 total-size counting */
|
||||
|
||||
/* Extra metadata used in SSH packet logging mode, allowing us to
|
||||
* log in the packet header line that the packet came from a
|
||||
|
Reference in New Issue
Block a user