TCP connection hijacking and parasites - as a good thing
Posted Aug 19, 2011 2:04 UTC (Fri) by
kevinm (guest, #69913)
Parent article:
TCP connection hijacking and parasites - as a good thing
(1) copying any buffered incoming data using the MSG_PEEK option to
recvmsg(), and (2) getting the sequence number to be read next with a new
SIOCGINSEQ ioctl() command.
This seems fundamentally racy. What happens if a new segment arrives in the kernel in between (1) and (2)? Instead of a new ioctl(), it should be a new `MSG_PEEK_SEQ` flag to recvmsg() that supplies a control message containing the sequence number, with the iovec pointing to the peeked data.
(
Log in to post comments)