From owner-freebsd-hackers Sun Oct 14 1:18:22 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from segfault.kiev.ua (segfault.kiev.ua [193.193.193.4]) by hub.freebsd.org (Postfix) with ESMTP id D2FF037B406 for ; Sun, 14 Oct 2001 01:18:15 -0700 (PDT) Received: (from uucp@localhost) by segfault.kiev.ua (8) with UUCP id LGY23303; Sun, 14 Oct 2001 11:18:02 +0300 (EEST) (envelope-from netch@iv.nn.kiev.ua) Received: (from netch@localhost) by iv.nn.kiev.ua (8.11.6/8.11.6) id f9E8GOP05252; Sun, 14 Oct 2001 11:16:24 +0300 (EEST) (envelope-from netch) Date: Sun, 14 Oct 2001 11:16:23 +0300 From: Valentin Nechayev To: Matt Dillon Cc: hackers@FreeBSD.ORG Subject: Re: sin_zero & bind problems Message-ID: <20011014111623.A3718@iv.nn.kiev.ua> 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 In-Reply-To: <200110131717.f9DHHLR43887@earth.backplane.com>; from dillon@earth.backplane.com on Sat, Oct 13, 2001 at 10:17:21AM -0700 X-42: On 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 Sat, Oct 13, 2001 at 10:17:21, dillon (Matt Dillon) wrote about "Re: sin_zero & bind problems": Matt, excuse me please... Why you send insults to programmers which were as unhappy as to put feet to your BSD-specific rake? They carefully read all documentation and examples (you cannot prove that they didn't do it). Their programs works correct on another platforms - on Linux and even on Win32. And only BSD clones contain such undocumented diversion. One should realize that new applications mainstream is now generated mainly on Linux, which doesn't contain such "feature". All examples I noted were developed on Linux and than ported to FreeBSD. Do you want to generate wide bunch of programmers who don't ever want to deal with system which such hidden stones? Well, let's explore FreeBSD sources. I explored RELENG_4_4 date=2001.10.06.00.00.00 tree for sockaddr_in usage as automatic variable. The very first of found - bin/date/netdate.c - shows use of such structure without prior zero-filling. (Of course it works because wants INADDR_ANY.) I see no reason to explore further.;( > Nobody in their right mind uses a struct sockaddr_in or any other > struct sock* type of structure without zeroing it first. 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. You didn't (and can't) prove that they are bad programmers. You didn't (and can't) prove that programmer's "right mind" must a priori prompt to fill sockaddr* structures with zeros. For any programmer known to me in real life, this knowledge was obtained after intensive "cerebral sex" ((c)local folklore). I don't know another structure which must be filled with zeros without mention in manuals, and rare cases with properly documented requirement. Yoy didn't (and can't IMO) show that there are some real usage of sin_zero, except nonsenseable garbage area. Whatever reason was to create reserved field, it is obsoleted now. I cannot see any sense in your message, except bad-formed emotions.:( Is it so difficult to add one (!) line to kernel source and avoid this tiresome teeth-ache forever? /netch To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message