From owner-freebsd-alpha Sat Jan 26 9:13: 6 2002 Delivered-To: freebsd-alpha@freebsd.org Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by hub.freebsd.org (Postfix) with ESMTP id 007BB37B400 for ; Sat, 26 Jan 2002 09:13:03 -0800 (PST) Received: (from uucp@localhost) by srv1.cosmo-project.de (8.11.6/8.11.6) with UUCP id g0QHCuM96774 for freebsd-alpha@freebsd.org; Sat, 26 Jan 2002 18:12:56 +0100 (CET) (envelope-from ticso@cicely8.cicely.de) Received: from mail.cicely.de (cicely20.cicely.de [10.1.1.22]) by cicely5.cicely.de (8.12.1/8.12.1) with ESMTP id g0QHDsZ9013761 for ; Sat, 26 Jan 2002 18:13:54 +0100 (CET)?g (envelope-from ticso@cicely8.cicely.de) Received: from cicely8.cicely.de (cicely8.cicely.de [10.1.2.10]) by mail.cicely.de (8.11.0/8.11.0) with ESMTP id g0QHDrW23604 for ; Sat, 26 Jan 2002 18:13:53 +0100 (CET) Received: (from ticso@localhost) by cicely8.cicely.de (8.11.6/8.11.6) id g0QHDqe89623 for freebsd-alpha@freebsd.org; Sat, 26 Jan 2002 18:13:52 +0100 (CET) (envelope-from ticso) Date: Sat, 26 Jan 2002 18:13:52 +0100 From: Bernd Walter To: freebsd-alpha@freebsd.org Subject: ifconfig alignment fix Message-ID: <20020126181352.C75106@cicely8.cicely.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="DBIVS5p969aUjpLe" Content-Disposition: inline User-Agent: Mutt/1.3.23i X-Operating-System: FreeBSD cicely8.cicely.de 5.0-CURRENT i386 Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --DBIVS5p969aUjpLe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline The reason is that struct ifa_msghdr is not n * 8 bytes. If an interface has an uneven number of addresses it toggles alignment for the next interface. I would be more happy when struct ifa_msghdr gets resized, but that will break binary compatibility. -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de --DBIVS5p969aUjpLe Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="ifconfig_align.patch" --- sys/net/rtsock.c.orig Sat Jan 26 16:59:56 2002 +++ sys/net/rtsock.c Sat Jan 26 17:00:01 2002 @@ -664,6 +664,7 @@ } len += dlen; } + len = _ALIGN(len); if (cp == 0 && w != NULL && !second_time) { register struct walkarg *rw = w; --DBIVS5p969aUjpLe-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message