From owner-freebsd-hackers Sun Jul 23 19: 6: 6 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id B8C9F37B8AD for ; Sun, 23 Jul 2000 19:06:03 -0700 (PDT) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.3/8.9.3) id WAA98542; Sun, 23 Jul 2000 22:06:01 -0400 (EDT) (envelope-from wollman) Date: Sun, 23 Jul 2000 22:06:01 -0400 (EDT) From: Garrett Wollman Message-Id: <200007240206.WAA98542@khavrinen.lcs.mit.edu> To: Alfred Perlstein Cc: hackers@freebsd.org Subject: kern.ipc.maxsockbuf vs reality? In-Reply-To: <20000723153345.P13979@fw.wintelcom.net> References: <20000723153345.P13979@fw.wintelcom.net> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG < said: > if ((u_quad_t)cc > (u_quad_t)sb_max * MCLBYTES / (MSIZE + MCLBYTES)) > return (0); I think the code here should clip the requested size into range rather than failing the allocation. That way, a program could just specify a ridiculously-large buffer size and get whatever is the configured maximum. -GAWollman -- Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same wollman@lcs.mit.edu | O Siem / The fires of freedom Opinions not those of| Dance in the burning flame MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message