Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Oct 2001 11:16:23 +0300
From:      Valentin Nechayev <netch@segfault.kiev.ua>
To:        Matt Dillon <dillon@earth.backplane.com>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: sin_zero & bind problems
Message-ID:  <20011014111623.A3718@iv.nn.kiev.ua>
In-Reply-To: <200110131717.f9DHHLR43887@earth.backplane.com>; from dillon@earth.backplane.com on Sat, Oct 13, 2001 at 10:17:21AM -0700
References:  <20011013135842.A415@iv.nn.kiev.ua> <200110131717.f9DHHLR43887@earth.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011014111623.A3718>