diff options
author | David S. Miller <davem@davemloft.net> | 2020-02-21 13:39:34 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-02-21 13:39:34 -0800 |
commit | e65ee2fb54d4745d7b7d9061d7fe33c5c5bf3b06 (patch) | |
tree | 04b1728c397ad4604a6163529f51dfd48dfdbc07 /net/tls | |
parent | b4d9785ce5c035b672f25df56706d0ff4e68b74e (diff) | |
parent | 0c0ddd6ae47c9238c18f475bcca675ca74c9dc31 (diff) | |
download | linux-e65ee2fb54d4745d7b7d9061d7fe33c5c5bf3b06.tar.gz linux-e65ee2fb54d4745d7b7d9061d7fe33c5c5bf3b06.tar.bz2 linux-e65ee2fb54d4745d7b7d9061d7fe33c5c5bf3b06.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Conflict resolution of ice_virtchnl_pf.c based upon work by
Stephen Rothwell.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tls')
-rw-r--r-- | net/tls/tls_device.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/net/tls/tls_device.c b/net/tls/tls_device.c index 1ba5a92832bb..1c5574e2e058 100644 --- a/net/tls/tls_device.c +++ b/net/tls/tls_device.c @@ -593,7 +593,7 @@ struct tls_record_info *tls_get_record(struct tls_offload_context_tx *context, u32 seq, u64 *p_record_sn) { u64 record_sn = context->hint_record_sn; - struct tls_record_info *info; + struct tls_record_info *info, *last; info = context->retransmit_hint; if (!info || @@ -605,6 +605,24 @@ struct tls_record_info *tls_get_record(struct tls_offload_context_tx *context, struct tls_record_info, list); if (!info) return NULL; + /* send the start_marker record if seq number is before the + * tls offload start marker sequence number. This record is + * required to handle TCP packets which are before TLS offload + * started. + * And if it's not start marker, look if this seq number + * belongs to the list. + */ + if (likely(!tls_record_is_start_marker(info))) { + /* we have the first record, get the last record to see + * if this seq number belongs to the list. + */ + last = list_last_entry(&context->records_list, + struct tls_record_info, list); + + if (!between(seq, tls_record_start_seq(info), + last->end_seq)) + return NULL; + } record_sn = context->unacked_record_sn; } |