From owner-svn-src-all@FreeBSD.ORG Tue Aug 10 18:43:19 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64804106564A; Tue, 10 Aug 2010 18:43:19 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 2365D8FC28; Tue, 10 Aug 2010 18:43:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o7AIfLEF077340; Tue, 10 Aug 2010 12:41:21 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 10 Aug 2010 12:41:53 -0600 (MDT) Message-Id: <20100810.124153.237540042763325649.imp@bsdimp.com> To: phk@phk.freebsd.dk From: "M. Warner Losh" In-Reply-To: <11606.1281464144@critter.freebsd.dk> References: <20100810.115457.1126759349893144516.imp@bsdimp.com> <11606.1281464144@critter.freebsd.dk> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: src-committers@FreeBSD.org, jilles@stack.nl, svn-src-all@FreeBSD.org, hrs@FreeBSD.org, olli@fromme.com, olli@FreeBSD.org, svn-src-head@FreeBSD.org, des@des.no Subject: Re: svn commit: r211023 - head/usr.sbin/syslogd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Aug 2010 18:43:19 -0000 In message: <11606.1281464144@critter.freebsd.dk> "Poul-Henning Kamp" writes: : In message <20100810.115457.1126759349893144516.imp@bsdimp.com>, "M. Warner Los : h" writes: : >In message: <20100811.023235.13138059.hrs@allbsd.org> : > Hiroki Sato writes: : >: Oliver Fromme wrote : >: in <201008101623.o7AGNs7I042679@haluter.fromme.com>: : >: : >: ol> -static int validate(struct sockaddr *, const char *); : >: ol> -static void unmapped(struct sockaddr *); : >: ol> +static int validate(struct sockaddr_storage *, const char *); : >: ol> +static void unmapped(struct sockaddr_storage *); : >: : >: Why is s/struct sockaddr */struct sockaddr_storage */ needed here? : >: Using (struct sockaddr *) as an argument looks reasonable to me since : >: the struct sockaddr_storage is mostly for memory allocation, not for : >: access via pointer. : > : >Because struct sockaddr * has a too loose alignment requirement for : >later casting, while sockaddr_storage has the proper alignment. : : This is the kind of detail Bruce, Warner and I know, but I bet it : was news to most of you. : : Somebody should add it to the relevant manualpages... It was news to me when I saw it :) But given other posix requirements for this interface, maybe there's a better fix... Warner