From owner-cvs-all@FreeBSD.ORG Wed Nov 22 17:18:10 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A855A16A403; Wed, 22 Nov 2006 17:18:10 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id 112D143D94; Wed, 22 Nov 2006 17:16:25 +0000 (GMT) (envelope-from sam@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAMHGsiZ013193; Wed, 22 Nov 2006 17:16:54 GMT (envelope-from sam@repoman.freebsd.org) Received: (from sam@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAMHGsmY013192; Wed, 22 Nov 2006 17:16:54 GMT (envelope-from sam) Message-Id: <200611221716.kAMHGsmY013192@repoman.freebsd.org> From: Sam Leffler Date: Wed, 22 Nov 2006 17:16:54 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/netinet tcp_usrreq.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Nov 2006 17:18:10 -0000 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