From owner-freebsd-hackers Sat Oct 13 12:18:27 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from milliways.chance.ru (milliways.chance.ru [195.190.107.35]) by hub.freebsd.org (Postfix) with ESMTP id F2F4337B403 for ; Sat, 13 Oct 2001 12:18:22 -0700 (PDT) Received: from do-labs.spb.ru (ppp-2.chance.ru [195.190.107.5]) by milliways.chance.ru (8.9.0/8.9.0) with SMTP id XAA04957 for ; Sat, 13 Oct 2001 23:18:20 +0400 (MSD) Received: (qmail 7288 invoked by uid 1000); 13 Oct 2001 23:19:56 -0000 Date: Sat, 13 Oct 2001 23:19:56 +0000 From: Vladimir Dozen To: hackers@FreeBSD.ORG Subject: Re: sin_zero & bind problems Message-ID: <20011013231956.A7214@eix.do-labs.spb.ru> References: <20011013135842.A415@iv.nn.kiev.ua> <200110131717.f9DHHLR43887@earth.backplane.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: <200110131717.f9DHHLR43887@earth.backplane.com>; from dillon@earth.backplane.com on Sat, Oct 13, 2001 at 10:17:21AM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, Oct 13, 2001 at 10:17:21AM -0700, Matt Dillon wrote: > Nobody in their right mind uses a struct sockaddr_in or any other > struct sock* type of structure without zeroing it first. Nobody in their right mind requires to fill any data except these used in given call. If no one checks, reads or alters sin_zero inside libc/kernel, why should user do it? For what? Does it prevent from detecting invalid parameters? No. It just eats a few processor cycles. For me, it looks like ... like requiring setting errno to zero before any system call. If you think it still required, it must be stated explicitely in documentation; btw, Single Unix Spec has no this requirement. > I suppose > we can document that in the man pages, but we certainly should not go > hacking up the kernel code to work around bad programmers. Work around? Nope. Just removing unnecessary constraint. -- dozen @ home To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message