From owner-freebsd-hackers Sat Oct 13 10:23: 8 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from earth.backplane.com (earth-nat-cw.backplane.com [208.161.114.67]) by hub.freebsd.org (Postfix) with ESMTP id 5655A37B417 for ; Sat, 13 Oct 2001 10:18:57 -0700 (PDT) Received: (from dillon@localhost) by earth.backplane.com (8.11.6/8.11.2) id f9DHHLR43887; Sat, 13 Oct 2001 10:17:21 -0700 (PDT) (envelope-from dillon) Date: Sat, 13 Oct 2001 10:17:21 -0700 (PDT) From: Matt Dillon Message-Id: <200110131717.f9DHHLR43887@earth.backplane.com> To: Valentin Nechayev Cc: hackers@FreeBSD.ORG Subject: Re: sin_zero & bind problems References: <20011013135842.A415@iv.nn.kiev.ua> 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 : :The following was initially formatted as PR, but I suppose it is reasonable :to discuss first here. There were some vague mentions that sin_zero field :of struct sockaddr_in may be used in future for some extensions; but this :future is already expired;) without any real step. :If the verdict will be to keep current behavior, it should be strictly :documented to remove this permanent rake field. : :>Description: : :If bind() syscall is called for PF_INET socket with address another than :INADDR_ANY, and sin_zero field in addr parameter is not filled with :... 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. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message