cvs commit: src/sys/netinet tcp_usrreq.c
Sam Leffler
sam at FreeBSD.org
Wed Nov 22 17:18:10 UTC 2006
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
Revision Changes Path
1.142 +6 -6 src/sys/netinet/tcp_usrreq.c
More information about the cvs-src
mailing list