Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 May 2009 09:19:45 +0100 (BST)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        "Bjoern A. Zeeb" <bz@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r192612 - head/sys/netinet
Message-ID:  <alpine.BSF.2.00.0905230909170.75344@fledge.watson.org>
In-Reply-To: <20090522231117.F72053@maildrop.int.zabbadoz.net>
References:  <200905222303.n4MN3Gsl021718@svn.freebsd.org> <20090522231117.F72053@maildrop.int.zabbadoz.net>

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



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