cvs commit: src/sys/netinet tcp_usrreq.c

Sam Leffler sam at errno.com
Wed Nov 22 17:21:29 UTC 2006


Sam Leffler wrote:
> sam         2006-11-22 17:16:54 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     sys/netinet          tcp_usrreq.c 
>   Log:
>   Change error codes returned by protocol operations when an inpcb is
>   marked INP_DROPPED or INP_TIMEWAIT:
>   o return ECONNRESET instead of EINVAL for close, disconnect, shutdown,
>     rcvd, rcvoob, and send operations
>   o return ECONNABORTED instead of EINVAL for accept
>   
>   These changes should reduce confusion in applications since EINVAL is
>   normally interpreted to mean an invalid file descriptor.  This change
>   does not conflict with POSIX or other standards I checked. The return
>   of EINVAL has always been possible but rare; it's become more common
>   with recent changes to the socket/inpcb handling and with finer-grained
>   locking and preemption.
>   
>   Note: there are other instances of EINVAL for this state that were
>         left unchanged; they should be reviewed.
>   
>   Reviewed by:    rwatson, andre, ru
>   MFC after:      1 month

Note I intentionally didn't change the manual pages.  I'll wait for any
discussion/refinement to settle before doing that.

	Sam


More information about the cvs-src mailing list