Re: svn commit: r324405 - head/sys/kern

2017-10-10 Thread Jason Eggleston
Sendfile does return EPIPE today. All that has to happen is receiving a RST after sendfile starts looping. There is a race condition, which still exists after this suggested patch, where ECONNRESET could be returned. But mostly it is EPIPE. On Oct 10, 2017 12:17 AM, "Konstantin Belousov"

Re: svn commit: r324405 - head/sys/kern

2017-10-10 Thread Konstantin Belousov
On Mon, Oct 09, 2017 at 04:20:52PM -0700, Gleb Smirnoff wrote: > Sean & Jason, > > On Sat, Oct 07, 2017 at 11:30:57PM +, Sean Bruno wrote: > S> Author: sbruno > S> Date: Sat Oct 7 23:30:57 2017 > S> New Revision: 324405 > S> URL: https://svnweb.freebsd.org/changeset/base/324405 > S> > S>

Re: svn commit: r324405 - head/sys/kern

2017-10-09 Thread Jason Eggleston
https://reviews.freebsd.org/D12633 On Mon, Oct 9, 2017 at 5:01 PM, Jason Eggleston wrote: > In tcp_input.c, this is where a RST is handled. so_error gets ECONNRESET, > then tcp_close() is called. > > case TCPS_ESTABLISHED: >

Re: svn commit: r324405 - head/sys/kern

2017-10-09 Thread Jason Eggleston
In tcp_input.c, this is where a RST is handled. so_error gets ECONNRESET, then tcp_close() is called. case TCPS_ESTABLISHED: case TCPS_FIN_WAIT_1: case TCPS_FIN_WAIT_2:

Re: svn commit: r324405 - head/sys/kern

2017-10-09 Thread Gleb Smirnoff
Sean & Jason, On Sat, Oct 07, 2017 at 11:30:57PM +, Sean Bruno wrote: S> Author: sbruno S> Date: Sat Oct 7 23:30:57 2017 S> New Revision: 324405 S> URL: https://svnweb.freebsd.org/changeset/base/324405 S> S> Log: S> Check so_error early in sendfile() call. Prior to this patch, if a S>

svn commit: r324405 - head/sys/kern

2017-10-07 Thread Sean Bruno
Author: sbruno Date: Sat Oct 7 23:30:57 2017 New Revision: 324405 URL: https://svnweb.freebsd.org/changeset/base/324405 Log: Check so_error early in sendfile() call. Prior to this patch, if a connection was reset by the remote end, sendfile() would just report ENOTCONN instead of