From owner-cvs-all@FreeBSD.ORG Tue Dec 4 14:41:49 2007 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37A7016A417; Tue, 4 Dec 2007 14:41:49 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 28CA913C459; Tue, 4 Dec 2007 14:41:49 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id lB4Efnos093302; Tue, 4 Dec 2007 14:41:49 GMT (envelope-from rrs@repoman.freebsd.org) Received: (from rrs@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id lB4EfmAj093301; Tue, 4 Dec 2007 14:41:48 GMT (envelope-from rrs) Message-Id: <200712041441.lB4EfmAj093301@repoman.freebsd.org> From: Randall Stewart Date: Tue, 4 Dec 2007 14:41:48 +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 sctp.h sctp_output.c sctp_structs.h sctputil.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: Tue, 04 Dec 2007 14:41:49 -0000 rrs 2007-12-04 14:41:48 UTC FreeBSD src repository Modified files: sys/netinet sctp.h sctp_output.c sctp_structs.h sctputil.c Log: - Found a problem in non-blocking sends. When sending, once the locks are all unlocked to do the copy's in, its possible that other events could then raise the number of bytes outstanding pushing it so not all the message would fit. This would then cause us to send only part of the message. This fix makes it so we keep a "reserved" amount that can be kept in mind when making calculations to send. - rcv msg args with a NULL/NULL for to/tolen will return an error incorrectly for the 1-2-1 model. - We were not doing 0 len return correctly and not setting cantrcv more correctly. Previouly we "fixed" this area by taking out the socantrcv since we then could not get the data out. The correct rix is to still flag the socket but alow a by-pass route to continue to read until all data is consumed. MFC after: 1 week Revision Changes Path 1.22 +9 -7 src/sys/netinet/sctp.h 1.62 +96 -71 src/sys/netinet/sctp_output.c 1.27 +1 -0 src/sys/netinet/sctp_structs.h 1.70 +9 -8 src/sys/netinet/sctputil.c