Date: Thu, 03 Aug 2006 10:11:11 -0700 From: Sam Leffler <sam@errno.com> To: Yar Tikhiy <yar@FreeBSD.org> Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/net if_vlan.c Message-ID: <44D22E2F.4070307@errno.com> In-Reply-To: <200608030959.k739x9N6007207@repoman.freebsd.org> References: <200608030959.k739x9N6007207@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Yar Tikhiy wrote: > yar 2006-08-03 09:59:09 UTC > > FreeBSD src repository > > Modified files: > sys/net if_vlan.c > Log: > Should vlan_input() ever be called with ifp pointing to a non-Ethernet > interface, do not just assign -1 to tag because it breaks the logic of > the code to follow. The better way is to handle this case as an unsupported > protocol and return unless INVARIANTS is in effect and we can panic. > Panic is good there because the scenario can happen only because of a > coding error elsewhere. > > We also should show the interface name in the panic message for easier > debugging of the problem, should it ever emerge. Introducing a panic in a place where you can trivially recover is bad regardless of why you got there. Many people run production systems with INVARIANTS turned on. Is it now possible to send a "packet of death" by exploiting this code path? Sam
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44D22E2F.4070307>