ktls/af_ktls

peek tcp data using tcp_read_sock

Closed this issue · 2 comments

We need a way to "peek" data from tcp socket using tcp_read_sock (which is stated in the comments that it is currently not supported). If for whatever reason we decide the packet is bad during the decryption stage, we can't let userspace SSL handle the packet since at that point it has already been pulled from TCP's receive queue.

http://lxr.free-electrons.com/source/net/ipv4/tcp.c#L1490
Related #37

#21 relates as well.

We could just introduce MSG_PEEK support for tcp_read_sock, if possible. There are already comments in sources.

I'm going to close this, this is being worked on upstream