From owner-svn-src-all@FreeBSD.ORG Sat May 23 08:19:46 2009 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 3F37D1065674; Sat, 23 May 2009 08:19:46 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 19C3D8FC0C; Sat, 23 May 2009 08:19:46 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 8ECC846B53; Sat, 23 May 2009 04:19:45 -0400 (EDT) Date: Sat, 23 May 2009 09:19:45 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: "Bjoern A. Zeeb" In-Reply-To: <20090522231117.F72053@maildrop.int.zabbadoz.net> Message-ID: References: <200905222303.n4MN3Gsl021718@svn.freebsd.org> <20090522231117.F72053@maildrop.int.zabbadoz.net> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r192612 - head/sys/netinet 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: Sat, 23 May 2009 08:19:46 -0000 On Fri, 22 May 2009, Bjoern A. Zeeb wrote: > On Fri, 22 May 2009, Bjoern A. Zeeb wrote: > >> Author: bz >> Date: Fri May 22 23:03:15 2009 >> New Revision: 192612 >> URL: http://svn.freebsd.org/changeset/base/192612 >> >> Log: >> If including vnet.h one has to include opt_route.h as well. This is >> because struct vnet_net holds the rt_tables[][] for MRT and array size >> is compile time dependent. If you had ROUTETABLES set to >1 after >> r192011 V_loif was pointing into nonsense leading to strange results >> or even panics for some people. >> >> Reviewed by: mz > > Thanks to everyone who helped to debug this! This sounds like the sort of bug that will recur easily in the future, as the double array based on configurable dimensions is not a very robust structure in C. Is there something we can do to make this more robust? For example, add assertions around consumers that appropriate includes are present in those consumers? Also, given that it's a compile-time option, rt_tables should probably be indirected to so that there isn't an issue with modules compiled with different kernel options? Especially network device drivers/modules that may need to use vnet and be distributed as binary ko's? Robert N M Watson Computer Laboratory University of Cambridge