From owner-cvs-all@FreeBSD.ORG Thu Aug 3 17:11:14 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9E10A16A4DD; Thu, 3 Aug 2006 17:11:14 +0000 (UTC) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1FC4F43D66; Thu, 3 Aug 2006 17:11:13 +0000 (GMT) (envelope-from sam@errno.com) Received: from [10.0.0.248] (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id k73HBBFn037511 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 3 Aug 2006 10:11:12 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <44D22E2F.4070307@errno.com> Date: Thu, 03 Aug 2006 10:11:11 -0700 From: Sam Leffler User-Agent: Thunderbird 1.5.0.4 (X11/20060724) MIME-Version: 1.0 To: Yar Tikhiy References: <200608030959.k739x9N6007207@repoman.freebsd.org> In-Reply-To: <200608030959.k739x9N6007207@repoman.freebsd.org> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/net if_vlan.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2006 17:11:14 -0000 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