Re: [PATCH net] net/tls: Fix wrong record sn in async mode of device resync

2020-11-12 Thread Jakub Kicinski
On Wed, 11 Nov 2020 14:55:56 +0200 Tariq Toukan wrote: > +static inline bool tls_bigint_subtract(unsigned char *seq, int len, u16 n) Please make n something more natural than u16. Helper should be general, not just serving the current use case. > + if (WARN_ON_ONCE(len != 8)) You can do a B

[PATCH net] net/tls: Fix wrong record sn in async mode of device resync

2020-11-11 Thread Tariq Toukan
In async_resync mode, we log the TCP seq of records until the async request is completed. Later, in case one of the logged seqs matches the resync request, we return it, together with its record serial number. Before this fix, we mistakenly returned the serial number of the current record instead